c7b7328cc99fd5d7c298e57c6020043451d89a61,keras/backend/theano_backend.py,,concatenate,#Any#Any#,884
Before Change
if axis == 0:
return th_sparse_module.basic.vstack(tensors, format="csr")
elif axis == 1:
return th_sparse_module.basic.hstack(tensors, format="csr")
else:
raise ValueError("Invalid concat axis for sparse matrix:", axis)
else:
return T.concatenate([to_dense(x) for x in tensors], axis=axis)
After Change
output = T.concatenate([to_dense(x) for x in tensors], axis=axis)
if py_all([hasattr(tensor, "_keras_shape") for tensor in tensors]):
input_shapes = [tensor._keras_shape for tensor in tensors]
output_shape = list(input_shapes[0])
for shape in input_shapes[1:]:
if output_shape[axis] is None or shape[axis] is None:
output_shape[axis] = None
break
output_shape[axis] += shape[axis]
output._keras_shape = tuple(output_shape)
return output
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: keras-team/keras
Commit Name: c7b7328cc99fd5d7c298e57c6020043451d89a61
Time: 2018-08-16
Author: ybliang8@gmail.com
File Name: keras/backend/theano_backend.py
Class Name:
Method Name: concatenate
Project Name: ray-project/ray
Commit Name: ee99c919e3c72ce65b68b5dbda7743b2735f2c71
Time: 2020-09-17
Author: krfricke@users.noreply.github.com
File Name: python/ray/tune/tests/test_ray_trial_executor.py
Class Name: RayTrialExecutorTest
Method Name: generate_trials
Project Name: ray-project/ray
Commit Name: ee99c919e3c72ce65b68b5dbda7743b2735f2c71
Time: 2020-09-17
Author: krfricke@users.noreply.github.com
File Name: python/ray/tune/tests/test_var.py
Class Name: VariantGeneratorTest
Method Name: generate_trials
Project Name: deepmipt/DeepPavlov
Commit Name: c672738b39c8f739551da0d88991a2fedfba3e14
Time: 2018-10-04
Author: puleon@mail.ru
File Name: deeppavlov/models/ranking/metrics.py
Class Name:
Method Name: rank_response