-
Create conda environment.
conda create -n onnx-pytorch python=3.8 conda activate onnx-pytorch
-
Install requirements.txt.
pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
-
Create directories.
mkdir ckpt mkdir data
-
Run
train.py
. The trained models will be saved in./ckpt
python train.py
-
Run
compare.py
to compare the ONNX model and general model weight.python compare.py
-
Run
onnx_to_keras.py
to run torch model as keras.python onnx_to_keras.py