a4d9c3a0656639f00ea0050e6535f7bf547d8719,research/object_detection/meta_architectures/faster_rcnn_meta_arch.py,FasterRCNNMetaArch,_gather_instance_masks,#FasterRCNNMetaArch#Any#Any#,866

Before Change


    
    k = tf.shape(instance_masks)[0]
    num_mask_classes = tf.shape(instance_masks)[1]
    instance_mask_height = tf.shape(instance_masks)[2]
    instance_mask_width = tf.shape(instance_masks)[3]
    classes = tf.reshape(classes, [-1])
    instance_masks = tf.reshape(instance_masks, [
        -1, instance_mask_height, instance_mask_width

After Change


    _, num_classes, height, width = instance_masks.get_shape().as_list()
    k = tf.shape(instance_masks)[0]
    instance_masks = tf.reshape(instance_masks, [-1, height, width])
    classes = tf.to_int32(tf.reshape(classes, [-1]))
    gather_idx = tf.range(k) * num_classes + classes
    return tf.gather(instance_masks, gather_idx)

  def _extract_rpn_feature_maps(self, preprocessed_inputs):
    Extracts RPN features.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: tensorflow/models
Commit Name: a4d9c3a0656639f00ea0050e6535f7bf547d8719
Time: 2018-04-13
Author: lzc@google.com
File Name: research/object_detection/meta_architectures/faster_rcnn_meta_arch.py
Class Name: FasterRCNNMetaArch
Method Name: _gather_instance_masks


Project Name: tensorflow/tpu
Commit Name: 2c631052b5c6109ee789be05dea30396e3c17dec
Time: 2019-07-18
Author: laigd@google.com
File Name: models/official/mask_rcnn/mask_rcnn_model.py
Class Name:
Method Name: build_model_graph


Project Name: deepchem/deepchem
Commit Name: 9ecdd1be28f016ea1ac158fe7a43f63277b066e7
Time: 2017-03-16
Author: bharath.ramsundar@gmail.com
File Name: deepchem/models/tf_new_models/vina_model.py
Class Name:
Method Name: compute_closest_neighbors


Project Name: asyml/texar
Commit Name: ac33ce03f8dd40959632ab590db66609bb0ed064
Time: 2017-12-28
Author: shore@pku.edu.cn
File Name: texar/core/layers.py
Class Name:
Method Name: multihead_attention