人工智能学习07--pytorch01--下载安装

一、pytorch简介

1、与TensorFlow区别
在这里插入图片描述
2、常用网络层
在这里插入图片描述

二、pytorch需要:

1、anaconda
2、CUDA 只能在NVIDIA上运行
↓我发现电脑果然没有这个显卡
https://zhidao.baidu.com/question/2084255692200398828.html
3、pycharm
新项目要配置python的编译器:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

- 安装CPU版本的pytorch

在这里插入图片描述

在此之前我安装了anaconda3
在这里插入图片描述
里面的Python版本
在这里插入图片描述
参考
https://blog.csdn.net/Bluebro/article/details/127161165

  1. 创建虚拟环境
conda create -n pytorch python=3.9

在这里插入图片描述
2. 激活虚拟幻境
在这里插入图片描述
在这里插入图片描述

  1. 下载pytorch(CPU版本)
    在这里插入图片描述
    设置镜像安装https://blog.csdn.net/Redamancy06/article/details/125820669
    直接在(pytorch)里面复制这两句
    清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes

中科大源

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes

再复制官网上面的命令,去掉-c pytorch
4. python ,import torch,torch.version
在这里插入图片描述

  1. 把pytorch应用到pycharm中
    中途出现了no model named ‘torch’
    解决:https://blog.csdn.net/qq_39237205/article/details/121056658
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

在这里插入图片描述

【 普通的anaconda python编译器:
https://blog.csdn.net/ww596520206/article/details/126580157
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

最后:
在这里插入图片描述

terminal 控制台原为PS,想让它指向(pytorch)
在这里插入图片描述
重新启动pycharm即可
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值