285dc85691241532cd976e04a089f409e44d7493,src/detection/tensor/detector.py,Detector,detect_multiple,#Detector#,40
Before Change
softmax_tensor = self.sess.graph.get_tensor_by_name("final_result:0")
answers = []
for image in image_array_list:
predictions = self.sess.run(softmax_tensor, {"DecodeJpeg:0": image})
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
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
range(10)]
results = []
for x in threads:
results.append(x.get())
return results
@staticmethod
def _pil_to_tf(image):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
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: 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: WheatonCS/Lexos
Commit Name: 1a8e10d0a88e25aa8b3ca9d7ea31225439d348a7
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_para_to_group
Project Name: WheatonCS/Lexos
Commit Name: d3fd161765b9c9652fab403bcc59fcbc8e40cfe9
Time: 2017-08-07
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/topword.py
Class Name:
Method Name: analyze_group_to_group