15a302edf591d62c7cc3353cb5b08625087ce548,official/vision/beta/projects/yolo/modeling/layers/nn_blocks.py,DarkResidual,build,#DarkResidual#Any#,271

Before Change


                           leaky_alpha=self._leaky_alpha)

    self._shortcut = ks.layers.Add()
    self._activation_fn = ks.layers.Activation(activation=self._sc_activation)

    super().build(input_shape)

  def call(self, inputs):

After Change


    // self._activation_fn = ks.layers.Activation(activation=self._sc_activation)
    if self._sc_activation == "leaky":
      alpha = {"alpha": self._leaky_alpha}
      self._activation_fn = partial(tf.nn.leaky_relu, **alpha)
    elif self._sc_activation == "mish":
      self._activation_fn = lambda x: x * tf.math.tanh(tf.math.softplus(x))
    else:
      self._activation_fn = tf_utils.get_activation(self._sc_activation)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tensorflow/models
Commit Name: 15a302edf591d62c7cc3353cb5b08625087ce548
Time: 2020-11-06
Author: banna3vishnu@gmail.com
File Name: official/vision/beta/projects/yolo/modeling/layers/nn_blocks.py
Class Name: DarkResidual
Method Name: build


Project Name: osmr/imgclsmob
Commit Name: 59ce4322d7b774394099f8af0381d1020623d919
Time: 2019-10-24
Author: osemery@gmail.com
File Name: gluon/gluoncv2/models/common.py
Class Name: SEBlock
Method Name: __init__


Project Name: osmr/imgclsmob
Commit Name: 29eac269527a4466dfef282374aed49ce66d9bfb
Time: 2018-09-06
Author: osemery@gmail.com
File Name: chainer_/models/nasnet.py
Class Name: NASNet
Method Name: __init__