-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add torch API usage example #99
Conversation
Thank you for your contribution. We require contributors to sign our Contributor License Agreement (CLA). We do not have a signed CLA on file for you. In order for us to review and merge your code, please sign our CLA here. After you signed, you can comment on this PR with |
@cla-bot check |
Thanks for tagging me. I looked for a signed form under your signature again, and updated the status on this PR. If the check was successful, no further action is needed. If the check was unsuccessful, please see the instructions in my first comment. |
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.
Thanks @timonmerk for the contribution! I left some small comments to adapt the style of the example to the remainder of the code base and also started the test suite (the code in the usage.rst
is tested as well).
Co-authored-by: Steffen Schneider <steffen@bethgelab.org>
Co-authored-by: Steffen Schneider <steffen@bethgelab.org>
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.
lgtm now, requesting review also from @MMathisLab
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.
Looks good! I'd make Cebra ~> CEBRA and need to check why the tests fail :)
- minor typesetting
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.
actually, just noticed a few additional minor edits re the use of the __len__
functions... will edit
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.
added a few comments to improve the example. apologies for missing these earlier. @timonmerk , no action needed here, I can do the edits
Addresses #97
Added minimal example of torch API.
In comparison to the
get_emissions
function in the https://cebra.ai/docs/demo_notebooks/Demo_Allen.html notebook, I used thesolver.transform
function, to keep the example a bit shorter