7c38f339c274bdc4eadde1e651731f456a5d4162,tensorflow_datasets/core/utils/tf_utils.py,,assert_shape_match,#Any#Any#,130
Before Change
shape1 (tuple): Static shape
shape2 (tuple): Dyncamic shape (can contains None)
if len(shape1) != len(shape2):
raise ValueError("Shapes should have same length: {} - {}".format(
len(shape1), len(shape2)))
if not all(
s1 == s2 // All shape should match
for s1, s2 in zip(shape1, shape2)
if s2 is not None):
After Change
shape1 = tf.TensorShape(shape1)
shape2 = tf.TensorShape(shape2)
if shape1.ndims is None or shape2.ndims is None:
raise ValueError("Shapes must have known rank. Got %s and %s." %
(shape1.ndims, shape2.ndims))
shape1.assert_same_rank(shape2)
shape1.assert_is_compatible_with(shape2)
def session():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 13
Instances
Project Name: tensorflow/datasets
Commit Name: 7c38f339c274bdc4eadde1e651731f456a5d4162
Time: 2018-11-06
Author: rsepassi@google.com
File Name: tensorflow_datasets/core/utils/tf_utils.py
Class Name:
Method Name: assert_shape_match
Project Name: elbayadm/attn2d
Commit Name: d3795d6cd1c66ac05dc0f4861ce69ab4680bff3d
Time: 2018-04-02
Author: myleott@fb.com
File Name: fairseq/distributed_utils.py
Class Name:
Method Name: all_gather_list