File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33from __future__ import absolute_import , division , print_function
44
5+ import matplotlib .pyplot as plt
6+ from matplotlib .colors import LogNorm
57import os
68import sys
79
@@ -871,8 +873,20 @@ def do_single_file_inference(input_file_path):
871873 inputs ['input_lengths' ]: [num_strides ],
872874 })
873875
876+ # np.set_printoptions(threshold=np.nan)
877+ # print(logits.size)
878+ # print(logits[0].size)
879+ # print(logits[5])
874880 logits = np .squeeze (logits )
875-
881+ print (logits .shape )
882+ print (logits .T .shape )
883+ plt .pcolor (logits .T , norm = LogNorm (vmin = logits .min (),vmax = logits .max ()))
884+ plt .title ('Log Normalized Logits from German Model for clip: "das ist ganz schön"' , fontsize = 20 )
885+ plt .xlabel ('Length of Audio Clip' , fontsize = 18 )
886+ plt .ylabel ('Index of UTF-8 Byte' , fontsize = 16 )
887+ plt .colorbar ()
888+ plt .show ()
889+
876890 scorer = Scorer (FLAGS .lm_alpha , FLAGS .lm_beta ,
877891 FLAGS .lm_binary_path , FLAGS .lm_trie_path ,
878892 Config .alphabet )
You can’t perform that action at this time.
0 commit comments