30146171032ed79ec99ff002ef8f7065c70d8536,tensorflow_transform/analyzers.py,,mean,#Any#Any#Any#Any#,449

Before Change


      raise TypeError("Tensor type %r is not supported" % x.dtype)
  sum_dtype, sum_fn = _sum_combine_fn_and_dtype(x.dtype)
  if isinstance(x, tf.SparseTensor):
    if not reduce_instance_dims:
      raise TypeError(
          "SparseTensor is only supported when reduce_instance_dims=True")
    x = x.values
  with tf.name_scope(name, "mean"):
    // For now _numeric_combine will return a tuple with as many elements as the
    // input tuple.

After Change


  with tf.name_scope(name, "mean"):
    if isinstance(x, tf.SparseTensor):
      if reduce_instance_dims:
        ones_values, x_values = tf.ones_like(x.values), x.values
      else:
        sparse_ones = tf.SparseTensor(
            indices=x.indices,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tensorflow/transform
Commit Name: 30146171032ed79ec99ff002ef8f7065c70d8536
Time: 2018-06-18
Author: tf-transform-dev@google.com
File Name: tensorflow_transform/analyzers.py
Class Name:
Method Name: mean


Project Name: brian-team/brian2
Commit Name: 1762cd0d2a62f55693774d655b0ae367008d7e2d
Time: 2012-09-12
Author: marcel.stimberg@ens.fr
File Name: brian2/units/fundamentalunits.py
Class Name: Quantity
Method Name: prod


Project Name: allenai/allennlp
Commit Name: d4926f5eaa33dc6ca89ac54bdaa104ca5ff86252
Time: 2021-02-12
Author: dirkg@allenai.org
File Name: allennlp/training/metrics/fbeta_multi_label_measure.py
Class Name: FBetaMultiLabelMeasure
Method Name: __call__