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)
if gamma_init is None:
After Change
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: dmlc/dgl
Commit Name: cf8a3fb30547d6e980ecd8182f64a51df8e55c62
Time: 2021-02-10
Author: expye@outlook.com
File Name: python/dgl/backend/pytorch/tensor.py
Class Name:
Method Name: pack_padded_tensor
Project Name: deepinsight/insightface
Commit Name: 79aacd2bb3323fa50a125b828bb1656166604487
Time: 2021-01-27
Author: guojia@gmail.com
File Name: tools/onnx2caffe/onnx2caffe/_operators.py
Class Name:
Method Name: _convert_resize