eb4732369125efb8c9c87ad79544e99c1aa3b67e,keras_rcnn/applications/_jhung2019.py,JHung2019,predict,#JHung2019#Any#Any#Any#Any#,294
Before Change
def predict(self, x, batch_size=None, verbose=0, steps=None):
target_bounding_boxes = numpy.zeros((x.shape[0], 1, 4))
target_categories = numpy.zeros((x.shape[0], 1, self.n_categories))
target_metadata = numpy.array([[x.shape[1], x.shape[2], 1.0]])
x = [
After Change
predicted_bounding_boxes, predicted_categories = prediction
predicted_bounding_boxes = numpy.squeeze(predicted_bounding_boxes)
predicted_categories = numpy.squeeze(predicted_categories)
predicted_categories = numpy.argmax(predicted_categories, axis=-1)
indices = numpy.where(predicted_categories > 0)
predicted_bounding_boxes = predicted_bounding_boxes[indices]
predicted_categories = predicted_categories[indices]
return predicted_bounding_boxes, predicted_categories
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: broadinstitute/keras-rcnn
Commit Name: eb4732369125efb8c9c87ad79544e99c1aa3b67e
Time: 2019-04-30
Author: allen.goodman@icloud.com
File Name: keras_rcnn/applications/_jhung2019.py
Class Name: JHung2019
Method Name: predict
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 601d77a77a55323770bb2b214aa8844538b13d1f
Time: 2018-09-25
Author: Maria-Irina.Nicolae@ibm.com
File Name: art/visualization.py
Class Name:
Method Name: convert_to_rgb
Project Name: allenai/allennlp
Commit Name: cf20c74c9be08800e9feb1c622c6ecc4f03899a3
Time: 2017-08-02
Author: markn@allenai.org
File Name: allennlp/modules/augmented_lstm.py
Class Name: AugmentedLstm
Method Name: forward