561a961d2e98e86cda621c7900e831e94cc011fc,deepchem/models/tensorgraph/layers.py,Layer,_get_input_tensors,#Layer#Any#Any#,75
Before Change
in_layers = [in_layers]
tensors = []
for input in in_layers:
if isinstance(input, tf.Tensor):
tensors.append(input)
elif isinstance(input, tf.Variable):
tensors.append(input)
elif isinstance(input, Layer):
tensors.append(input.out_tensor)
else:
raise ValueError("Unexpected input: " + str(input))
if reshape and len(tensors) > 1:
shapes = [t.get_shape() for t in tensors]
if any(s != shapes[0] for s in shapes[1:]):
// Reshape everything to match the input with the most dimensions.
After Change
in_layers = [in_layers]
tensors = []
for input in in_layers:
tensors.append(tf.convert_to_tensor(input) )
if reshape and len(tensors) > 1:
shapes = [t.get_shape() for t in tensors]
if any(s != shapes[0] for s in shapes[1:]):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: deepchem/deepchem
Commit Name: 561a961d2e98e86cda621c7900e831e94cc011fc
Time: 2017-08-21
Author: rbharath@stanford.edu
File Name: deepchem/models/tensorgraph/layers.py
Class Name: Layer
Method Name: _get_input_tensors
Project Name: deepmind/sonnet
Commit Name: ef86d2e73e7ce03c4184a04a336d96caf661269a
Time: 2017-07-03
Author: noreply@google.com
File Name: sonnet/python/modules/conv.py
Class Name: Conv1DTranspose
Method Name: _build
Project Name: tensorlayer/tensorlayer
Commit Name: 87aeace11d364ece7c8fae8ddab02786e5a2492e
Time: 2019-01-23
Author: zhangjqsmiling@gmail.com
File Name: tensorlayer/layers/core.py
Class Name: Layer
Method Name: __call__