flask8 examine
This commit is contained in:
parent
07b7beabad
commit
255eec296a
@ -23,7 +23,7 @@ def load_label_and_score(keyword, label_file, score_file):
|
||||
for line in fin:
|
||||
arr = line.strip().split()
|
||||
key = arr[0]
|
||||
str_list = arr[1: ]
|
||||
str_list = arr[1:]
|
||||
scores = list(map(float, str_list))
|
||||
score_table[key].append(scores)
|
||||
keyword_table = {}
|
||||
@ -93,4 +93,3 @@ if __name__ == '__main__':
|
||||
false_alarm_per_hour,
|
||||
false_reject_rate))
|
||||
threshold += args.step
|
||||
|
||||
@ -57,7 +57,7 @@ def get_args():
|
||||
help='prefetch number')
|
||||
parser.add_argument('--score_file',
|
||||
required=True,
|
||||
help='output score file')
|
||||
help='output score file')
|
||||
parser.add_argument('--jit_model',
|
||||
action='store_true',
|
||||
default=False,
|
||||
@ -117,7 +117,7 @@ def main():
|
||||
score = logits[i][:lengths[i]]
|
||||
for keyword_i in range(num_keywords):
|
||||
keyword_scores = score[:, keyword_i]
|
||||
score_frames = ' '.join(['{:.6f}'.format(x)
|
||||
score_frames = ' '.join(['{:.6f}'.format(x)
|
||||
for x in keyword_scores.tolist()])
|
||||
fout.write('{} {}\n'.format(key, score_frames))
|
||||
if batch_idx % 10 == 0:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user