6291404af8c48b0f9f7993abf5e895ce2de07f29,research/object_detection/utils/spatial_transform_ops.py,,multilevel_native_crop_and_resize,#Any#Any#Any#Any#Any#,414
Before Change
return native_crop_and_resize(images[0], boxes, crop_size, scope=None)
croped_feature_list = []
for level, image in enumerate(images):
level_boxes = tf.gather(boxes, box_levels == (level-1))
cropped = native_crop_and_resize(image, level_boxes, crop_size)
croped_feature_list.append(cropped)
return tf.concat(croped_feature_list, axis=0)
After Change
// [1, -1] + level_boxes.shape.as_list()[1:])
cropped = native_crop_and_resize(image, boxes, crop_size)
print(cropped)
cond = tf.tile(tf.equal(box_levels, level)[:, :, tf.newaxis], [1, 1] + [tf.math.reduce_prod(cropped.shape.as_list()[2:])])
cond = tf.reshape(cond, cropped.shape)
print(cond)
cropped_final = tf.where(cond, cropped, tf.zeros_like(cropped))
// cropped[tf.where(box_levels != level)] = tf.zeros(crop_size)
print(cropped_final)
croped_feature_list.append(cropped_final)
return tf.concat(croped_feature_list, axis=0)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: tensorflow/models
Commit Name: 6291404af8c48b0f9f7993abf5e895ce2de07f29
Time: 2020-06-28
Author: syiming@umich.edu
File Name: research/object_detection/utils/spatial_transform_ops.py
Class Name:
Method Name: multilevel_native_crop_and_resize
Project Name: GPflow/GPflow
Commit Name: a1d15164eceb07b8c98e95df75e540467524a384
Time: 2018-01-04
Author: james@prowler.io
File Name: gpflow/likelihoods.py
Class Name: SwitchedLikelihood
Method Name: _partition_and_stitch
Project Name: GPflow/GPflow
Commit Name: a75f24ad02e8f5fb80589983267963fd907a4cc0
Time: 2018-01-08
Author: james.hensman@gmail.com
File Name: gpflow/likelihoods.py
Class Name: SwitchedLikelihood
Method Name: _partition_and_stitch