diff --git a/README.md b/README.md index 829ef337..daf748fd 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ cd examples/inference/python then you can check the performance by simply running following commands. `hf_bart_export.py` is used to transform pytorch weights to LightSeq protobuffer. ```shell -python export/hf_bart_export.py +python export/huggingface/hf_bart_export.py python test/ls_bart.py ``` diff --git a/examples/inference/python/export/huggingface/hf_bart_export.py b/examples/inference/python/export/huggingface/hf_bart_export.py index 82a0effd..2d3c0290 100644 --- a/examples/inference/python/export/huggingface/hf_bart_export.py +++ b/examples/inference/python/export/huggingface/hf_bart_export.py @@ -2,6 +2,10 @@ Export Hugging Face BART models to protobuf/hdf5 format. """ import os +import sys +sys.path.append( + os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) +) from collections import OrderedDict import tensorflow as tf