f55fb3d6df9df979c7fd551d7db7d633fbc80260,tensorflow_ranking/python/losses.py,,_get_valid_pairs_and_clean_labels,#Any#,284
Before Change
labels.get_shape().assert_has_rank(2)
is_valid = utils.is_label_valid(labels)
valid_pairs = tf.logical_and(
tf.expand_dims(is_valid, 2), tf.expand_dims(is_valid, 1))
labels = tf.compat.v1.where(is_valid, labels, tf.zeros_like(labels))
return valid_pairs, labels
After Change
labels = tf.convert_to_tensor(value=labels)
labels.get_shape().assert_has_rank(2)
is_valid = utils.is_label_valid(labels)
valid_pairs = _apply_pairwise_op(tf.logical_and, is_valid)
labels = tf.compat.v1.where(is_valid, labels, tf.zeros_like(labels))
return valid_pairs, labels
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorflow/ranking
Commit Name: f55fb3d6df9df979c7fd551d7db7d633fbc80260
Time: 2019-11-12
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses.py
Class Name:
Method Name: _get_valid_pairs_and_clean_labels
Project Name: tensorflow/ranking
Commit Name: f55fb3d6df9df979c7fd551d7db7d633fbc80260
Time: 2019-11-12
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses.py
Class Name: DCGLambdaWeight
Method Name: pair_weights
Project Name: tensorflow/ranking
Commit Name: f55fb3d6df9df979c7fd551d7db7d633fbc80260
Time: 2019-11-12
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses.py
Class Name: PrecisionLambdaWeight
Method Name: pair_weights
Project Name: tensorflow/ranking
Commit Name: f55fb3d6df9df979c7fd551d7db7d633fbc80260
Time: 2019-11-12
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses.py
Class Name:
Method Name: _get_valid_pairs_and_clean_labels