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

Added tensor transforms jupyter notebook #2730

Merged
merged 9 commits into from
Oct 7, 2020

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Sep 29, 2020

Description:

  • Updated docs and provided an example of scriptable transforms

@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@87c7864). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2730   +/-   ##
=========================================
  Coverage          ?   72.87%           
=========================================
  Files             ?       96           
  Lines             ?     8309           
  Branches          ?     1292           
=========================================
  Hits              ?     6055           
  Misses            ?     1858           
  Partials          ?      396           
Impacted Files Coverage Δ
torchvision/transforms/transforms.py 80.92% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 87c7864...38db145. Read the comment docs.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I have some early comments, which are nits

examples/python/scriptable_transforms/inference.py Outdated Show resolved Hide resolved
examples/python/scriptable_transforms/inference.py Outdated Show resolved Hide resolved
@vfdev-5
Copy link
Collaborator Author

vfdev-5 commented Sep 30, 2020

ToDo: Improve inference example

  • Inference on batch input (CPU and GPU)
  • list advantages: jit script, batch and GPU
  • convert the script to a jupyter notebook + Colab

@vfdev-5 vfdev-5 changed the title [WIP] Added scriptable transforms python example [WIP] Added tensor transforms jupyter notebook Oct 5, 2020
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the improvements, this is looking great!

I've made some more comments, let me know what you think

examples/python/README.md Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
examples/python/tensor_transforms.ipynb Outdated Show resolved Hide resolved
+ updated docstrings
@vfdev-5 vfdev-5 changed the title [WIP] Added tensor transforms jupyter notebook Added tensor transforms jupyter notebook Oct 6, 2020
Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, thanks!

I can't comment on the specific lines of the notebook because it's too large (due to the images) so GitHub won't show it. There are a few minor things that I think could be improved, but they can be added in a follow-up PR.

There are a few empty cells that could be cleaned up as well.

Also, is there a way of making the notebook a bit smaller? It's currently > 1MB, maybe cleaning up the images (by removing the output of all cells) could help there?

torchvision/transforms/transforms.py Outdated Show resolved Hide resolved
@vfdev-5
Copy link
Collaborator Author

vfdev-5 commented Oct 7, 2020

@fmassa thanks for the review, I can address all that in this PR:

  • remove images, empty cells and ToDo section
  • replace all mentions of "torch jit script" by "torchscript"

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@fmassa fmassa merged commit 6eff0a4 into pytorch:master Oct 7, 2020
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* [WIP] Added scriptable transforms python example

* Replaced script file with jupyter notebook

* Updated readme

* Updates according to review
+ updated docstrings

* Updated notebook and docstring according to the review

* torch script -> torchscript
vfdev-5 added a commit to Quansight/vision that referenced this pull request Dec 4, 2020
* [WIP] Added scriptable transforms python example

* Replaced script file with jupyter notebook

* Updated readme

* Updates according to review
+ updated docstrings

* Updated notebook and docstring according to the review

* torch script -> torchscript
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

Successfully merging this pull request may close these issues.

2 participants