b6437e4dd115c5b290eb84b0620610b497293609,models/official/detection/serving/inputs.py,,raw_image_tensor_input,#Any#Any#Any#,59

Before Change


      dtype=tf.float32,
      shape=(batch_size, image_height, image_width, 3))

  image_shape = tf.cast(tf.shape(placeholder)[1:3], dtype=tf.float32)

  image_info_per_image = tf.stack(
      [image_shape,
       image_shape,
       tf.constant([1.0, 1.0], dtype=tf.float32),
       tf.constant([0.0, 0.0], dtype=tf.float32)])
  if batch_size == 1:
    images_info = tf.expand_dims(image_info_per_image, axis=0)
  else:
    images_info = tf.tile(
        tf.expand_dims(image_info_per_image, axis=0), [batch_size, 1, 1])

  images = placeholder
  return placeholder, {"images": images, "image_info": images_info}

After Change


    images_info = tf.constant([image_info_per_image], dtype=tf.float32)
  else:
    images_info = tf.constant(
        [image_info_per_image for _ in range(batch_size)],
        dtype=tf.float32)

  images = placeholder
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: tensorflow/tpu
Commit Name: b6437e4dd115c5b290eb84b0620610b497293609
Time: 2020-05-12
Author: pengchong@google.com
File Name: models/official/detection/serving/inputs.py
Class Name:
Method Name: raw_image_tensor_input


Project Name: tensorflow/tpu
Commit Name: dca76ad8ebe547f400682f09e27d497254905d1d
Time: 2020-06-15
Author: pengchong@google.com
File Name: models/official/detection/serving/inputs.py
Class Name:
Method Name: raw_image_tensor_input


Project Name: taehoonlee/tensornets
Commit Name: b9927f30cb9c92040c30d0fe8c735d8baea167b2
Time: 2019-03-13
Author: me@taehoonlee.com
File Name: tensornets/layers.py
Class Name:
Method Name: gconvbn