c1bff4fc71e1fd769c2801520d8041263b962771,deepchem/models/tensorgraph/layers.py,Multiply,create_tensor,#Multiply#Any#Any#,568
Before Change
super(Multiply, self).__init__(**kwargs)
def create_tensor(self, in_layers=None, set_tensors=True, **kwargs):
if in_layers is None:
in_layers = self.in_layers
in_layers = convert_to_layers(in_layers)
out_tensor = in_layers[0].out_tensor
for layer in in_layers[1:]:
out_tensor *= layer.out_tensor
if set_tensors:
self.out_tensor = out_tensor
return out_tensor
After Change
def __init__(self, **kwargs):
super(Multiply, self).__init__(**kwargs)
def create_tensor(self, in_layers=None, set_tensors=True, **kwargs):
inputs = self._get_input_tensors(in_layers, True)
out_tensor = inputs[0]
for layer in inputs[1:]:
out_tensor *= layer
if set_tensors:
self.out_tensor = out_tensor
return out_tensor
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances
Project Name: deepchem/deepchem
Commit Name: c1bff4fc71e1fd769c2801520d8041263b962771
Time: 2017-05-19
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorgraph/layers.py
Class Name: Multiply
Method Name: create_tensor
Project Name: deepchem/deepchem
Commit Name: c1bff4fc71e1fd769c2801520d8041263b962771
Time: 2017-05-19
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorgraph/layers.py
Class Name: ReduceSquareDifference
Method Name: create_tensor
Project Name: deepchem/deepchem
Commit Name: c1bff4fc71e1fd769c2801520d8041263b962771
Time: 2017-05-19
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorgraph/layers.py
Class Name: Add
Method Name: create_tensor
Project Name: deepchem/deepchem
Commit Name: c1bff4fc71e1fd769c2801520d8041263b962771
Time: 2017-05-19
Author: peter.eastman@gmail.com
File Name: deepchem/models/tensorgraph/layers.py
Class Name: Multiply
Method Name: create_tensor