You usually have three channels (one for red, one for green, one for blue) with values between 0 and 1.
Tutorials on Basics of Pytorch:
Just go for it! If you have an idea for a blog post, donât overthink and write it.
Do it for yourself, mainly, and youâd be surprised by how many people will find that useful afterward.
There are no beginner-level posts.
There are just posts you write and posts you donât write. Make sure to go for the first option.
My take on blogging:
- Whenever you work on something, no matter how big it is, clean it up and write a post on it.
- This in incredibly helpful as, just by typing it down, you will immediately notice if things make sense or not, if you have made a mistake, how to state your thoughts in a clearer way, etc.
- I found myself going back to posts I wrote a year ago checking what I did and how. Super handy!
- I found myself showing my posts to recruiters or even during an interview. E.g. it happened to me to be asked: âDo you have experience in video classification?â and I reply âSure, let me share my screen and show this post of mineâ, which is A LOT better than starting chit-chatting about some random approach you heard by someone else. YOU actually implemented that yourself and it adds a ton of value when job-hunting!
- even in a working environment, sooner or later you will be obliged to summarize your work in a presentation/email/wiki. If you are a blogger already this will come very natural to you!
Long story short, just start your own blog! Do it now!
This is mine and it truly changed my life for the better.
No, only because the utilities that draw images understand normalized floating point representations for images.
No, cause the library used for plotting (matplotlib) expects either ints going from 0 to 255 or floats going from 0 to 1.
why even if my image is in black and white, it still extrapolate the 3 channels RGB?
Is there a way to convert to black and white immediately?
You need to use the type PILImageBW
for black and white images.
awesome. thank so much
There are some cases where itâs a good idea to extrapolate to 3 channels, for example if your pretrained model was pretrained on RGB images
How do you compare the mean absolute difference and RMSE. Is one better than the other or is it application dependant?
To add to that, if youâre curious/skeptical on how blogging might be helpful for your career: My blog was really helpful when I was freelancing as well as even while I was interviewing for Google AI residency and in my current role too!
Even though honestly, I had started and sometimes still expect no one to read it.
So those are what L1 norm and L2 norm means, been using both of them for so long now, and written them by hand, but always thought it was talking about something completely different. âŚis there a glossary in the book? (for vocab and such?)
RMSE is usually smoother. It also penalizes more heavily big differences than smaller differences than MAE.
I donât think one is better than the other. RMSE is more common because itâs easier to do maths withâŚ
There is a slight different between both, that is RMSE gives more âweightâ to big changes than small changes.
Opps, @sgugger was faster
This is pretty low level, but are there any good resources on why numpy arrays canât be used on GPUs? Just generally curious about GPU vs CPU computation.
To do computation on NVIDIA GPUs, you need CUDA support. PyTorch has CUDA support and NumPy doesnât
Behind the scenes numpy uses C
For GPU you need stuff that uses Cuda (or other GPU languages)
Can all future lectures be using the Notebooks without slides please?
Seconded! I really like being able to run, modify, and try things while Jeremyâs going through the notebook.
Another way to solve the 3 vs 7 digit classification problem
Suppose we have a test image that is known to be either a 3 or a 7.
First âflattenâ each of the three images (the test image, the âmean 3â image and the âmean 7â image) to a vector of length 28*28 = 784.
Then compute:
- The dot product of the
flattened test image vector
with theflattened averaged 3 image vector
- The dot product of the
flattened test image vector
with theflattened averaged 7 image vector
.
Classify the test image as a 3
if the first dot product is larger than the second; otherwise classify it as a 7
.