eb4732369125efb8c9c87ad79544e99c1aa3b67e,keras_rcnn/applications/_jhung2019.py,JHung2019,predict,#JHung2019#Any#Any#Any#Any#,294
Before Change
target_categories = numpy.zeros((x.shape[0], 1, self.n_categories))
target_metadata = numpy.array([[x.shape[1], x.shape[2], 1.0]])
x = [
target_bounding_boxes,
target_categories,
x,
target_metadata
]
return super(JHung2019, self).predict(x, batch_size, verbose, steps)
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: 9
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: tensorflow/cleverhans
Commit Name: 4887ef8baecbf5315ec0f235e56a4f93cd05aad7
Time: 2018-10-04
Author: nottombrown@gmail.com
File Name: cleverhans/attacks_tf.py
Class Name:
Method Name: spm
Project Name: yahoo/TensorFlowOnSpark
Commit Name: 981e4266d4ea816b08a762193bd52f40cd1a3242
Time: 2019-08-07
Author: leewyang@verizonmedia.com
File Name: examples/mnist/keras/mnist_inference.py
Class Name:
Method Name: inference