-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Update our cpp export tutorial #560
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
Conversation
|
Deploy preview for pytorch-tutorials-preview failed. Built with commit 39aaf86 https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/5d2f6862635013000a782293 |
|
Deploy preview for pytorch-tutorials-preview failed. Built with commit 4294700 https://app.netlify.com/sites/pytorch-tutorials-preview/deploys/5d2f68d16b0ce000096c4cd7 |
|
Deploy preview for pytorch-tutorials-preview ready! Built with commit d028e91 https://deploy-preview-560--pytorch-tutorials-preview.netlify.com |
advanced_source/cpp_export.rst
Outdated
| method:: | ||
| it to a ``ScriptModule``. | ||
| In order to convert the module to the ``ScriptModule``, one needs to | ||
| enable ``torch.jit._enable_recursive_script`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This flag is gone in nightly and recursive mode is always on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oopsie, I'll fix this.
|
@Krovatkin Nick, can you rebase this? Thanks! |
fix cpp block rearrange stray comments address david's feedback
ddf2f8b to
400b466
Compare
|
@brianjo done! |
|
@Krovatkin is this ready for merge? |
|
@suo looks it like it's out of date again. Lemme rebase it again |
|
@brianjo @Krovatkin running the code in the tutorial here did not work. See here. |
|
@SethHWeidman I'll take a look! |
|
@SethHWeidman looks like you are using 1.1.0. This tutorial was updated for 1.2 or 1.1.1 whichever it will be called. |
|
@Krovatkin cool - that is why I noted that I used 1.1.0 🙂. I will check that this works with nightly as well! |
|
@Krovatkin still getting an error using 1.2.0. See here for how I exported the model into C++ (doesn't explicitly say how to do so in the tutorial). When I save the model and try to load into C++, as in the tutorial, I get an error; it simply says "error loading the model". (Step 3 of the tutorial) Also, the tutorial contains this line: This is all on |
|
I'll take a look!
…On Thu, Aug 8, 2019, 15:05 Seth Weidman ***@***.***> wrote:
@Krovatkin <https://github.com/Krovatkin> still getting an error using
1.2.0. See here
<https://github.com/SethHWeidman/tutorials/blob/exploratory/advanced_source/cpp_test/CPP%20test.ipynb>
for how I exported the model into C++ (doesn't explicitly say how to do so
in the tutorial).
When I save the model and try to load into C++, as in the tutorial, I get
an error; it simply says "error loading the model". (Step 3 of the tutorial)
Also, the tutorial contains this line: traced_script_module.save("model.pt
"), which doesn't make sense since we haven't defined an object called
traced_script_module.
This is all on torch 1.2.0 by the way. Can you please try testing the C++
load sections and see if they work?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#560?email_source=notifications&email_token=ABGZY4WHEEM4QVM4VVB6HSDQDSKEJA5CNFSM4IETHWKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35BAZI#issuecomment-519704677>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGZY4WRYMWB3VUOEO35H5LQDSKEJANCNFSM4IETHWKA>
.
|
|
Thanks @Krovatkin. Update:
See my Hope this helps. |
I'll make the correction!
What's |
|
Hey @Krovatkin, I see what you mean, you're right: the problem is that we save two models during the tutorial, and unless people are paying close attention - which, I acknowledge, they should be! - they might try to run How about we call the models different things to clarify - see here. I think just calling the ResNet model Tutorial is great by the way - very clear and to-the-point. Thanks for looking into this 🙂 |
|
@SethHWeidman , Thank you very much for your very detailed feedback! I'll tried to address all the points you brought up in #609 . Please let me know if I missed anything. |
Update our cpp export tutorial
No description provided.