546866f67f0674e52fa76547e98380ba51921b8c,models/official/mobilenet/inception_preprocessing.py,,apply_with_random_selector,#Any#Any#Any#,43

Before Change


  
  sel = tf.random_uniform([], maxval=num_cases, dtype=tf.int32)
  // Pass the real x only to one of the func calls.
  return control_flow_ops.merge([
      func(control_flow_ops.switch(x, tf.equal(sel, case))[1], case)
      for case in range(num_cases)])[0]


def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
  Distort the color of a Tensor image.

After Change


  
  sel = tf.random_uniform([], maxval=num_cases, dtype=tf.int32)
  // Pass the real x only to one of the func calls.
  pairs = []
  for i in range(num_cases):

    def _apply(i_value=i):
      return func(x, i_value)

    pairs.append((tf.equal(sel, i), _apply))
  return tf.case(pairs)


def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
  Distort the color of a Tensor image.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/tpu
Commit Name: 546866f67f0674e52fa76547e98380ba51921b8c
Time: 2019-10-08
Author: power@google.com
File Name: models/official/mobilenet/inception_preprocessing.py
Class Name:
Method Name: apply_with_random_selector


Project Name: marcoancona/DeepExplain
Commit Name: 2fe1f942de95b3fe11acb4881c8f18f65d73bd8e
Time: 2017-11-03
Author: marco.ancona@inf.ethz.ch
File Name: deepexplain/tensorflow/methods.py
Class Name:
Method Name: deepexplain_grad


Project Name: cmu-db/ottertune
Commit Name: 8cec62160ffd56f90c781f7524f643b95896c455
Time: 2020-01-08
Author: dvanaken@cs.cmu.edu
File Name: server/website/website/utils.py
Class Name: TaskUtil
Method Name: get_tasks