887f94bd4f292778622304ba627727a6dacad43f,deepchem/models/tensorgraph/layers.py,Conv3D,create_tensor,#Conv3D#Any#Any#,2013

Before Change


      parent_tensor = tf.expand_dims(parent_tensor, 4)
    for reuse in (self._reuse, False):
      try:
        out_tensor = tf.layers.conv3d(
            parent_tensor,
            filters=self.num_outputs,
            kernel_size=self.kernel_size,
            strides=self.stride,
            padding=self.padding,
            activation=self.activation_fn,
            activity_regularizer=self.normalizer_fn,
            bias_initializer=self.biases_initializer(),
            kernel_initializer=self.weights_initializer(),
            name=self._get_scope_name(),
            reuse=reuse)
        break
      except ValueError:
        if reuse:
          // This probably means the variable hasn"t been created yet, so try again

After Change


      parent_tensor = tf.expand_dims(parent_tensor, 4)
    for reuse in (self._reuse, False):
      try:
        if tfe.in_eager_mode():
          if not self._built:
            self._layer = self._build_layer(False)
          layer = self._layer
        else:
          layer = self._build_layer(reuse)
        out_tensor = layer(parent_tensor)
        if self.normalizer_fn is not None:
          out_tensor = self.normalizer_fn(out_tensor)
        break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepchem/deepchem
Commit Name: 887f94bd4f292778622304ba627727a6dacad43f
Time: 2018-03-25
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/layers.py
Class Name: Conv3D
Method Name: create_tensor


Project Name: tensorflow/tensorflow
Commit Name: 89e81228719825b36d6278276efcd6fc146574a3
Time: 2020-10-30
Author: gardener@tensorflow.org
File Name: tensorflow/python/grappler/layout_optimizer_test.py
Class Name: LayoutOptimizerTest
Method Name: testConv3D


Project Name: tensorflow/tensorflow
Commit Name: 09640bc683a23130c29ba4ab6dc53e20c2a48fa5
Time: 2020-11-20
Author: kaixih@nvidia.com
File Name: tensorflow/python/grappler/layout_optimizer_test.py
Class Name: LayoutOptimizerTest
Method Name: testConv3D