e9102d12d24e0809bf5e6d8fcd766488178c12f5,deepchem/models/tensorgraph/layers.py,Highway,create_tensor,#Highway#Any#Any#,632
Before Change
def create_tensor(self, in_layers=None, set_tensors=True, **kwargs):
inputs = self._get_input_tensors(in_layers)
parent = inputs[0]
shape = parent.get_shape().as_list()[1]
// H(x), with same number of input and output channels
dense_H = tf.contrib.layers.fully_connected(
parent,
num_outputs=shape,
After Change
if tfe.in_eager_mode():
layers = self._layers
else:
layers = self._build_layers()
dense_H = layers[0](parent)
dense_T = layers[1](parent)
out_tensor = tf.multiply(dense_H, dense_T) + tf.multiply(
parent, 1 - dense_T)
if set_tensors:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: deepchem/deepchem
Commit Name: e9102d12d24e0809bf5e6d8fcd766488178c12f5
Time: 2018-03-22
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/layers.py
Class Name: Highway
Method Name: create_tensor
Project Name: horovod/horovod
Commit Name: 459b67df38f9254b3d12cb7df6a49059e3134479
Time: 2020-07-21
Author: taddair@uber.com
File Name: horovod/tensorflow/mpi_ops.py
Class Name:
Method Name: _allgather_grad
Project Name: OpenNMT/OpenNMT-tf
Commit Name: 5a6928a1c19fa0756cec6340224434c0a9f37367
Time: 2019-04-01
Author: guillaume.klein@systrangroup.com
File Name: opennmt/layers/transformer.py
Class Name:
Method Name: combine_heads