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

edited cifar10_tutorial.py #2604

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

anikethc
Copy link

Fixes #792

Description

I've set the code blocks to be non-executable. However, the sections titled "2. Define a Convolution Neural Network" and "3. Define a Loss function and optimizer" should retain their executability to ensure error-free execution. I've also cleaned up the code by removing extraneous symbols , fixed the imaged which was not being rendered correctly and made the links clickable.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 12, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/2604

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@anikethc
Copy link
Author

Hi @svekars,
I've made some changes and would appreciate it if you could review them. Thanks!

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

Please restrict your PR to one fix at the time and perhaps add before and after picture

For example https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html already renders pictures correctly and links are already clickable, so I'm a bit confused why change to the link formatting/ image rendering are necessary

@@ -32,8 +31,7 @@
‘dog’, ‘frog’, ‘horse’, ‘ship’, ‘truck’. The images in CIFAR-10 are of
size 3x32x32, i.e. 3-channel color images of 32x32 pixels in size.

.. figure:: /_static/img/cifar10.png
:alt: cifar10
![](https://pytorch.org/tutorials/_images/cifar10.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is needed? (I.e. keeping it as is allows one to re-host the repository anywhere they want, isn't it?)

@anikethc
Copy link
Author

Sorry I will keep that in mind for next issue. I was referring to the colab file the image isnt rendering correctly and all the link are unclickable in the colab https://colab.research.google.com/github/pytorch/tutorials/blob/gh-pages/_downloads/cifar10_tutorial.ipynb#scrollTo=N1BibYLW8C4N .

@malfet
Copy link
Contributor

malfet commented Oct 13, 2023

@anikethc at the very least, .py files should remain valid executable files, which is not the case after your changes, is it?

@anikethc
Copy link
Author

Everything was working fine when I executed the ipynb in the google colab https://colab.research.google.com/drive/1GOhFgmRs-nMF9W7eJjcmBahk6SbBJLXS?usp=sharing maybe something went wrong when I converted it into .py file. I will look into it. Thank you for being patient with me.

@anikethc anikethc requested a review from malfet October 20, 2023 01:38
@anikethc
Copy link
Author

anikethc commented Nov 4, 2023

Hi @malfet , Could you please review the commit.

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

Can you please restrict this PR to just making blogs non-executable?

I.e. the convention throughout the tutorials are to use rst markup convention, not HTML one, which makes lots of <IMG and <A HREF changes wrong. I understand that they do not render in the collab notebook correctly, but this probably tells something about converter pipeline

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

Successfully merging this pull request may close these issues.

Make codeblocks non-executable
3 participants