07e464d81392c4e918e8c0f394793449866b0166,tensorpack/models/layer_norm.py,,InstanceNorm,#,67
Before Change
mean, var = tf.nn.moments(x, axis, keep_dims=True)
if not use_affine:
return tf.divide(x - mean, tf.sqrt(var + epsilon), name="output")
beta = tf.get_variable("beta", [ch], initializer=tf.constant_initializer())
beta = tf.reshape(beta, new_shape)
After Change
beta = tf.reshape(beta, new_shape)
else:
beta = tf.zeros([1, 1, 1, 1], name="beta", dtype=x.dtype)
if scale:
gamma = tf.get_variable("gamma", [ch], initializer=gamma_initializer)
gamma = tf.reshape(gamma, new_shape)
else:
gamma = tf.ones([1, 1, 1, 1], name="gamma", dtype=x.dtype)
ret = tf.nn.batch_normalization(x, mean, var, beta, gamma, epsilon, name="output")
vh = ret.variables = VariableHolder()
if scale:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorpack/tensorpack
Commit Name: 07e464d81392c4e918e8c0f394793449866b0166
Time: 2020-03-08
Author: ppwwyyxx@users.noreply.github.com
File Name: tensorpack/models/layer_norm.py
Class Name:
Method Name: InstanceNorm
Project Name: keunwoochoi/kapre
Commit Name: fe8a6175dc98c7bc3b667fe88afcb5c2a4c94169
Time: 2017-01-17
Author: gnuchoi+github@gmail.com
File Name: kapre/stft.py
Class Name: Stft
Method Name: call
Project Name: wenwei202/iss-rnns
Commit Name: fb98d7bb1877611d096861d5808cf09003ed718a
Time: 2017-06-30
Author: weiwen.web@gmail.com
File Name: my/tensorflow/general.py
Class Name:
Method Name: add_dimen_grouplasso