4d6cb5a6ea1fc8632a96591582b88d7088fafbf2,tensorlayer/layers/normalization.py,InstanceNorm,build,#InstanceNorm#Any#,420

Before Change


        //     initializer=tf.compat.v1.initializers.truncated_normal(mean=1.0, stddev=0.02), dtype=LayersConfig.tf_dtype
        // )
        self.scale = self._get_weights(
            "scale", shape=[inputs_shape[-1]], init=tf.compat.v1.initializers.truncated_normal(mean=1.0, stddev=0.02)
        )
        // self.offset = tf.compat.v1.get_variable(
        //     self.name + "\offset", [inputs.get_shape()[-1]], initializer=tf.compat.v1.initializers.constant(0.0),

After Change


        if self.beta_init:
            self.beta = self._get_weights("beta", shape=params_shape, init=self.beta_init)

        if self.gamma_init:
            self.gamma = self._get_weights("gamma", shape=params_shape, init=self.gamma_init)

    def forward(self, inputs):
        mean, var = tf.nn.moments(inputs, self.axes, keepdims=True)
        outputs = batch_normalization(inputs, mean, var, self.beta, self.gamma, self.epsilon, self.data_format)
        if self.act:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 4d6cb5a6ea1fc8632a96591582b88d7088fafbf2
Time: 2019-05-11
Author: yingda.yin@gmail.com
File Name: tensorlayer/layers/normalization.py
Class Name: InstanceNorm
Method Name: build


Project Name: tensorlayer/tensorlayer
Commit Name: 813e576d5c878e33ed75c594f54d057312e66daf
Time: 2019-01-16
Author: dhsig552@163.com
File Name: tensorlayer/layers/convolution/expert_conv.py
Class Name: Conv2dLayer
Method Name: build


Project Name: tensorlayer/tensorlayer
Commit Name: 813e576d5c878e33ed75c594f54d057312e66daf
Time: 2019-01-16
Author: dhsig552@163.com
File Name: tensorlayer/layers/convolution/expert_conv.py
Class Name: Conv3dLayer
Method Name: build