Skip to content

Commit

Permalink
Merge pull request google#94 from XericZephyr/fix/submission_file_header
Browse files Browse the repository at this point in the history
Add submission file header.
  • Loading branch information
LeegleechN authored Aug 16, 2019
2 parents 4018448 + 53ffa56 commit df38b63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def set_up_init_ops(variables):
heapq.heappush(heaps[cls], (score, segment_id))
logging.info("Writing sorted segment predictions to: %s",
final_out_file.name)
final_out_file.write("Class,Segments\n")
for cls, cls_heap in heaps.items():
cls_heap.sort(key=lambda x: x[0], reverse=True)
final_out_file.write("%d,%s\n" %
Expand Down

0 comments on commit df38b63

Please sign in to comment.