torch / torch7

http://torch.ch
Other
8.97k stars 2.38k forks source link

Converting a torch7 model to a binary view for C/C++/C# programs #1144

Closed GlebSBrykin closed 5 years ago

GlebSBrykin commented 6 years ago

I would like to rewrite this neural network to pure C++ (or C#) without using GPU and deep learning packages (torch, caffe, TensorFlow, keras), for the simplest and most understandable code (in fact, pure mathematics). But I've run into a few problems. One of them is reading a pre-learned model on torch7. Could you convert the data of this model to binary form or JSON? At the same time, I have no experience with Linux. Of course I need this solely for educational purposes and personal use.

greed2411 commented 6 years ago

@PABCSoft this from pytorch to C++ using ATen, but i guess this is the only close solution i could find: