[Fix] inference of paddle 3.0

pull/3963/head
megemini 8 months ago
parent aaaf7d5686
commit 7249cb2b0a

@ -592,7 +592,7 @@ def get_predictor(
# after paddle 3.0, support new inference interface
if paddlespeech.utils.satisfy_paddle_version('3.0.0-beta'):
model_name = str(model_file).rstrip('.pdmodel')
model_name = ''.join(str(model_file).rsplit('.', 1)[:-1])
assert model_name == str(params_file).rstrip(
'.pdiparams'
), "The prefix of model_file and params_file should be same."

Loading…
Cancel
Save