285dc85691241532cd976e04a089f409e44d7493,src/detection/tensor/detector.py,Detector,detect_multiple,#Detector#Any#,40

Before Change


                predictions = np.squeeze(predictions)
                answer = {}
                for node_id in range(len(predictions)):
                    answer[self.labels[node_id]] = predictions[node_id]
                answers.append(answer)
            return answers

    @staticmethod

After Change


    def detect_multiple(self, images):
        image_array_list = [self._pil_to_tf(image) for image in images]

        pool = ThreadPool()

        with tf.device("/gpu:0"):
            softmax_tensor = self.sess.graph.get_tensor_by_name("final_result:0")
            threads = [pool.apply_async(operation, args=(self.sess, softmax_tensor, image_array_list[i],)) for i in
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: geometalab/OSMDeepOD
Commit Name: 285dc85691241532cd976e04a089f409e44d7493
Time: 2016-08-12
Author: samuel.kurath@gmail.com
File Name: src/detection/tensor/detector.py
Class Name: Detector
Method Name: detect_multiple


Project Name: openeventdata/mordecai
Commit Name: 580af77a96d8c6b306ad4425eafd7768df00338a
Time: 2018-06-27
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparser
Method Name: geoparse


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 81367c60491717618de2f4bcf17c63b5c6aebcc7
Time: 2017-05-30
Author: yutiansut@qq.com
File Name: QUANTAXIS/QASU/save_tushare.py
Class Name:
Method Name: QA_save_stock_day_all