Skip to content

Lukeli0425/PyTorch-Tutorials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch-Tutorials

About

This repo includes resources, codes and notes while learning PyTorch.

Environment Setup

All my codes are built on an M1 Macbook Air(Apple Silicon). Therefore we need to install Miniforge from here since Anaconda and Miniconda don't work on Apple Silicon.

After installation, we can create an virtual environment via Miniforge:

conda create --n pytorch python=3.8

I named it "pytorch" since I'm only using it when learning PyTorch. Note that we need to create a py38 environment if we want to run PyTorch on Apple Silicon. Acitivate the environment:

conda activate pytorch

Now we can install PyTorch on our environment:

conda install pytorch torchvision -c pytorch

Verify the installation by importing torch & torchvision and printing their versions:

import torch
import torchvision
print(f"torch=={torch.__version__}")
print(f"torchvision=={torchvision.__version__}")
print("Hello PyTorch!")

If no errors were raised, the installation is successful. My output is:

torch==1.10.2
torchvision==0.11.0a0
Hello PyTorch!

Here we install some other packages in case of future usage:

conda install matplotlib scikit-learn pandas
conda install jupyter notebook

File Listings

References

PyTorch Docs

Tutorial Videos on Bilibili

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published