Use the command to create a new virtual environment
conda create --name XX python=3.8 -y
Start this virtual environment
conda activate XX
Install the necessary tool kit
pip install torch torchvision
pip install matplotlib
Add the created virtual environment to jupyter notebook Of kernel in
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=XX
start-up jupyter notebook
jupyter notebook
Tools :pytorch,torchvision,matplotlib
tensorflow and pytorch difference :
tensorflow Based on static graph , The calculation process / The calculation diagram is built first , Then input it into the calculation diagram .
pytorch Based on dynamic graph , That is to say pytorch Each forward calculation will reproduce and build a new calculation diagram , This feature makes pytorch More intuitive , The logic of writing code is closer python Its own style , Easy to debug .
2021 year 3 month Python Analy