I am trying to use a model which is already trained (I have stored the state_dict in a .pth file) in OCaml. I have been attempting to install OCaml-torch. However, I faced some issues installing and using the library.
While following the installation instructions [Downloaded and unzipped Libtorch] -
export LIBTORCH=./libtorch
git clone https://github.com/LaurentMazare/ocaml-torch.git
cd ocaml-torch
make clean
make all
I get the following error -
File "src/stubs/torch_bindings_generated.ml", line 8309, characters 2-16:
Error: Multiple definition of the type name t.
Names must be unique in a given structure or signature.
File "src/wrapper/torch_bindings_generated.ml", line 8309, characters 2-16:
Error: Multiple definition of the type name t.
Names must be unique in a given structure or signature.
Makefile:34: recipe for target 'all' failed
make: *** [all] Error 1
Let me know a way to overcome the above error. Thanks!
PS: Is there any other way to use a model in OCaml?