MCPcopy Create free account
hub / github.com/modelscope/FunASR / inv_mapping_func

Method inv_mapping_func

funasr/models/eend/utils/report.py:134–147  ·  view source on GitHub ↗

Inv mapping func. Args: label: TODO. mapping_dict: TODO.

(self, label, mapping_dict)

Source from the content-addressed store, hash-verified

132 print("Valid cost time ... ", ud_valid)
133
134 def inv_mapping_func(self, label, mapping_dict):
135 """Inv mapping func.
136
137 Args:
138 label: TODO.
139 mapping_dict: TODO.
140 """
141 if not isinstance(label, int):
142 label = int(label)
143 if label in mapping_dict["label2dec"].keys():
144 num = mapping_dict["label2dec"][label]
145 else:
146 num = -1
147 return num
148
149 def report_core(self, model, data_loader, device):
150 """Report core.

Callers 1

report_coreMethod · 0.95

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected