Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading Custom Torch model(.t7) using cpp-torch API #19

Open
vinayak618 opened this issue Oct 11, 2018 · 2 comments
Open

Loading Custom Torch model(.t7) using cpp-torch API #19

vinayak618 opened this issue Oct 11, 2018 · 2 comments

Comments

@vinayak618
Copy link

Hi, first of all thank you so much for the api, its so simple to load the torch model into c api now and see the real quick results, But how about loading a custom model which is in torch(.t7) format.
how to add custom layers into your code?

Basically I have a model, and I tried loading it using your API, but got stuck and error was:
ERROR:
std::shared_ptrcpptorch::object object_loader::read_object(std::istream&): Assertion `0' failed.
Aborted (core dumped)

@yepan89
Copy link

yepan89 commented Nov 21, 2018

@vinayak618 I have the same problem. Did you solve it?

@vinayak618
Copy link
Author

That error was due to custom "cudnn.MODULENAME"(Ex. Cudnn.SpatialConvolution),
Check out the functions in your torch (.t7) files using torch.load and convert all the cudnn. to nn. using cudnn.convert() function. once all have been converted to nn. then use cpp-torch and it should work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants