- Python3
$ python train.py --valid --verbose
- the evaluation result will be saved at
./evaluations
- the model's weight will be saved as
./weights/estimator.ckpt
- convert PyTorch model to Torch script
$ python convert.py
- the Torch script module will be saved as
./weights/traced_regression_net_model.pt
- donwload libtorch zip file and unzip it
- move libtorch to
/usr/local/lib
- compile estimator
$ cd lib/estimator/
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build . --config Release
$ mkdir libestimator
$ mv libestimator.so libestimator
- move libestimator to
/usr/local/lib
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libestimator
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/libtorch/lib
$ make
$ ./pwm_estimator