Remove hardcoded constants from evaluate_tflite.py
This commit is contained in:
parent
3637f88c06
commit
c2f336b3e3
@ -30,16 +30,9 @@ This module should be self-contained:
|
||||
Then run with a TF Lite model, a scorer and a CSV test file
|
||||
'''
|
||||
|
||||
BEAM_WIDTH = 500
|
||||
LM_ALPHA = 0.75
|
||||
LM_BETA = 1.85
|
||||
|
||||
def tflite_worker(model, scorer, queue_in, queue_out, gpu_mask):
|
||||
os.environ['CUDA_VISIBLE_DEVICES'] = str(gpu_mask)
|
||||
ds = Model(model)
|
||||
ds.setBeamWidth(BEAM_WIDTH)
|
||||
ds.enableExternalScorer(scorer)
|
||||
ds.setScorerAlphaBeta(LM_ALPHA, LM_BETA)
|
||||
|
||||
while True:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user