LaurentMazare / ocaml-torch

OCaml bindings for PyTorch
Apache License 2.0
412 stars 38 forks source link

vgg19.ot file #45

Closed sbeckeriv closed 4 years ago

sbeckeriv commented 4 years ago

Dearest maintainer,

I have spent a while searching around the internet for a compatible vgg19.ot file for https://github.com/LaurentMazare/tch-rs . I was wondering if you had plans to provide the provide the file or could give advice on how I can generate the file? I have found .pth, .caffemodel, .h5 and a .cpkt but I honestly have little clue to what I am doing.

Thank you for any advice! Becker

LaurentMazare commented 4 years ago

There was no such model that I was aware of so I created one, you can get it here: vgg19.ot. These files can easily be generated from pre-trained model using the python api running this script. This outputs a npz file that can be converted to a .ot via the indications at the beginning of the script. I only tested the resulting ocaml-torch model on a couple images but it seemed to work well.

sbeckeriv commented 4 years ago

Thank you very much! i look forward to comparing the differences! Thank you for pointing me to the script as well. Next time I will try to get that running first.

Thanks again Becker