Code Monkey home page Code Monkey logo

Comments (4)

Mahosaurus avatar Mahosaurus commented on June 28, 2024 1

@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.

MarcusFra avatar MarcusFra commented on June 28, 2024

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)

in https://github.com/falloutdurham/beginners-pytorch-deep-learning/blob/master/chapter2/Chapter%202.ipynb?

If you still have the stacktrace I'd be thankful if you can share it.

from beginners-pytorch-deep-learning.

MarcusFra avatar MarcusFra commented on June 28, 2024

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.

Mahosaurus avatar Mahosaurus commented on June 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.