Coder Social home page Coder Social logo

Comments (7)

mantasu avatar mantasu commented on August 26, 2024

Yes, you will need GPU acceleration which is supported by PyTorch for M1 chips as well. You can install PyTorch by following this guide https://developer.apple.com/metal/pytorch/. Then just install the requirements:

pip install -r assignment3/requirements.txt

from cs231n.

ge1mina023 avatar ge1mina023 commented on August 26, 2024

thanks~

from cs231n.

ge1mina023 avatar ge1mina023 commented on August 26, 2024

What should I do additionally? Only comment out the code about google colab?

from cs231n.

mantasu avatar mantasu commented on August 26, 2024

You should also do the following changes in the files that actually use GPU acceleration:

  1. In Generative_Adversarial_Networks.ipynb, whenever .type(dtype) is called, change that to .to(device="mps")
  2. In Self_Supervised_Learning.ipynb change the final line in the 4th code cell:
    # device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    device = torch.device("mps" if torch.backends.mps.is_available() else "cpu")

from cs231n.

ge1mina023 avatar ge1mina023 commented on August 26, 2024

Is that all I need to do?

from cs231n.

mantasu avatar mantasu commented on August 26, 2024

I can't confirm since I don't have Apple M1. It should be all but if you encounter any issues let me know.

from cs231n.

ge1mina023 avatar ge1mina023 commented on August 26, 2024

I can't confirm since I don't have Apple M1. It should be all but if you encounter any issues let me know.

thanks a lot~

from cs231n.

Related Issues (12)

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.