Comments (4)
@MarcusFra : My mistake was to look into the old repository and mix the code up. This one here has the correct syntax.
from beginners-pytorch-deep-learning.
Hi @Mahosaurus!
Could you please elaborate a bit more what issue has arisen?
Did you need to replace the model in order to run the code?
Have you replaced the code line
img = torch.unsqueeze(img, 0)
If you still have the stacktrace I'd be thankful if you can share it.
from beginners-pytorch-deep-learning.
Ah, sorry my fault. You were referring to chapter 3. World you like to share your whole notebook with your solution?
from beginners-pytorch-deep-learning.
Hi @MarcusFra: Thanks for responding. I cant share the notebook as I have been using it for further experimentation.
The prediction part for chapter 3, I changed as follows in comp to chapter 2.
img = Image.open("file.jpg")
img = img_transforms(img).unsqueeze(0)
prediction = F.softmax(alexcnnmodel(img))
prediction = prediction.argmax()
labels[prediction]
from beginners-pytorch-deep-learning.
Related Issues (20)
- Ch. 8 Flask service: server.py not executable
- Ch 5 Error: OSError: [E050] Can't find model 'en'. HOT 1
- Chapter 4 - Replacing the Classifier HOT 2
- Dataset for chapter 2 HOT 2
- Many cat and fish pictures seem to be missing HOT 2
- How do you evaluate Chapter 3 Model? HOT 3
- Chapter 6: A Journey Into Sound HOT 2
- How to use the function named classify_tweet in chapter5? HOT 4
- the csv link seems not work and I alter another images folder
- problem with googletrans and 'the cat sat on the mat' HOT 2
- Chapter 5: Problem with latest version of Juypter Notebook HOT 3
- Chapter 4: cannot assign 'torch.nn.modules.container.Sequential' as child module HOT 6
- chapter 2 - training loss differet in github and in the book HOT 1
- chapter 5 becoming obsolete :-( HOT 4
- Chapter 2: Imagefolder passes only filename without path to `is_valid_file` HOT 2
- chapter 2, page 21: 'data' is not defined in data.DataLoader() HOT 2
- chapter 2 has unknown mistake, please help me HOT 6
- Chapter 6: The ESC-50 folder name are different between book and repo code HOT 1
- Chapter 2: Error with the check_image function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beginners-pytorch-deep-learning.