e376d832a69d399fcfc882099989b22b8bcfec32,magenta/models/coconet/lib_hparams.py,Dilated,__init__,#Dilated#Any#Any#Any#Any#Any#,222
Before Change
(self.key, input_depth, output_depth))
assert num_layers >= 4
// TODO(annahuang): determine the num of dilations based on crop length.
dilation_rates = [2**i for i in range(7)]
assert "num_dilation_blocks" in kwargs
assert "dilate_time_only" in kwargs
num_dilation_blocks = kwargs["num_dilation_blocks"]
dilate_time_only = kwargs["dilate_time_only"]
self.layers = []
def _add(**kwargs):
self.layers.append(kwargs)
_add(filters=[3, 3, input_depth, num_filters])
for _ in range(num_dilation_blocks):
for dilation_rate in dilation_rates:
if dilate_time_only:
layer_dilation_rates = [dilation_rate, 1]
else:
layer_dilation_rates = dilation_rate
tf.logging.info("layer_dilation_rates %r" % layer_dilation_rates)
_add(filters=[3, 3, num_filters, num_filters],
dilation_rate=layer_dilation_rates)
_add(filters=[2, 2, num_filters, num_filters])
_add(
filters=[2, 2, num_filters, output_depth], activation=lib_util.identity)
After Change
max_time_dilation_level = (
compute_max_dilation_level(kwargs["crop_piece_len"]))
max_pitch_dilation_level = (
compute_max_dilation_level(num_pitches))
max_dilation_level = max(max_time_dilation_level, max_pitch_dilation_level)
if kwargs["repeat_last_dilation_level"]:
tf.logging.info("Increasing max dilation level from %s to %s"
% (max_dilation_level, max_dilation_level + 1))
max_dilation_level += 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: tensorflow/magenta
Commit Name: e376d832a69d399fcfc882099989b22b8bcfec32
Time: 2018-06-22
Author: chengzhiannahuang@gmail.com
File Name: magenta/models/coconet/lib_hparams.py
Class Name: Dilated
Method Name: __init__
Project Name: ntucllab/libact
Commit Name: e857888dff9361561fcc96068ab50f79ed5a26bc
Time: 2017-01-30
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/query_by_committee.py
Class Name: QueryByCommittee
Method Name: make_query
Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: