61aed4b5a0cedb977292ab38312d6b86fa4e41d1,tensorflow/python/data/experimental/ops/interleave_ops.py,,sample_from_datasets_v2,#Any#Any#Any#Any#,160
Before Change
if weights.dtype not in (dtypes.float32, dtypes.float64):
raise TypeError("`weights` must be convertible to a tensor of "
"`tf.float32` or `tf.float64` elements.")
if not weights.shape.is_compatible_with([num_datasets]) :
raise ValueError(
"`weights` must be a vector of length `len(datasets)`.")
After Change
logits = [[1.0] * len(datasets)]
else:
if not _shapes_are_compatible(datasets, weights) :
raise ValueError("`weights` must have the same length as `datasets`.")
// Use the given `weights` as the probability of choosing the respective
// input.
if not isinstance(weights, ops.Tensor):
datasets, weights = _skip_datasets_with_zero_weight(datasets, weights)
weights = ops.convert_to_tensor(weights, name="weights")
if weights.dtype not in (dtypes.float32, dtypes.float64):
raise TypeError("`weights` must be convertible to a tensor of "
"`tf.float32` or `tf.float64` elements.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: tensorflow/tensorflow
Commit Name: 61aed4b5a0cedb977292ab38312d6b86fa4e41d1
Time: 2021-04-30
Author: yangchen@google.com
File Name: tensorflow/python/data/experimental/ops/interleave_ops.py
Class Name:
Method Name: sample_from_datasets_v2
Project Name: tensorflow/hub
Commit Name: 0daa6cd054cbb8935e952c0c4db3443dc89d49a8
Time: 2020-09-24
Author: no-reply@google.com
File Name: tensorflow_hub/tensor_info.py
Class Name:
Method Name: _convert_to_compatible_tensor
Project Name: Bihaqo/t3f
Commit Name: e2f9a04f406c8f8d75708669074511479e9cb6a5
Time: 2017-04-13
Author: novikov@bayesgroup.ru
File Name: t3f/riemannian.py
Class Name:
Method Name: already_projected_scalar_products_matrix