00d47eb3923d8722f75d56ba15139ad6821e2f50,basic/evaluator.py,AccuracyEvaluator2,compare,#Any#Any#,132
Before Change
class AccuracyEvaluator2(AccuracyEvaluator):
@staticmethod
def compare(yi, ypi):
i = int(np.argmax(yi.flatten()))
j = int(np.argmax(ypi.flatten()))
// print(i, j, i == j)
return i == j
class TempEvaluation(AccuracyEvaluation):
def __init__(self, data_type, global_step, idxs, yp, yp2, y, y2, correct, loss, f1s):
super(TempEvaluation, self).__init__(data_type, global_step, idxs, yp, y, correct, loss)
self.y2 = y2
After Change
@staticmethod
def compare(yi, ypi):
for start, stop in yi:
para_start = int(np.argmax(np.max(ypi, 1)))
sent_start = int(np.argmax(ypi[para_start]))
if tuple(start) == (para_start, sent_start):
return True
return False
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: wenwei202/iss-rnns
Commit Name: 00d47eb3923d8722f75d56ba15139ad6821e2f50
Time: 2016-08-29
Author: seominjoon@gmail.com
File Name: basic/evaluator.py
Class Name: AccuracyEvaluator2
Method Name: compare
Project Name: Calamari-OCR/calamari
Commit Name: 4739b63ace381d3ab573032d6f2335dcb30d5e92
Time: 2018-05-31
Author: wick.chr.info@gmail.com
File Name: calamari_ocr/ocr/backends/ctc_decoder/fuzzy_ctc_decoder.py
Class Name: FuzzyCTCDecoder
Method Name: decode
Project Name: chainer/chainercv
Commit Name: a7706fbde22887909db42f96a696437c084c05db
Time: 2017-05-31
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/evaluations/eval_detection_voc.py
Class Name:
Method Name: eval_detection_voc