Set batch size to 1 for more streaming ASR models (#1280)
This commit is contained in:
@@ -1,9 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
|
||||
import onnxruntime
|
||||
from onnxruntime.quantization import QuantType, quantize_dynamic
|
||||
|
||||
|
||||
def show(filename):
|
||||
session_opts = onnxruntime.SessionOptions()
|
||||
session_opts.log_severity_level = 3
|
||||
sess = onnxruntime.InferenceSession(filename, session_opts)
|
||||
for i in sess.get_inputs():
|
||||
print(i)
|
||||
|
||||
print("-----")
|
||||
|
||||
for i in sess.get_outputs():
|
||||
print(i)
|
||||
|
||||
|
||||
def get_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
@@ -25,6 +39,9 @@ def get_args():
|
||||
def main():
|
||||
args = get_args()
|
||||
print(vars(args))
|
||||
print(f"----------{args.input}----------")
|
||||
show(args.input)
|
||||
print("------------------------------")
|
||||
|
||||
quantize_dynamic(
|
||||
model_input=args.input,
|
||||
|
||||
Reference in New Issue
Block a user