栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

pytorch部署到jupyter中

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

pytorch部署到jupyter中

pytorch部署到jupyter中


在安装Aconda的同时,会将jupyter notebook一起安装,不过这里的jupyter notebook是base中的jupyter notebook二不是pytorch中的jupyter notebook,因此并不能在此jupyter notebook运行torch包。
base中的jupyter:

两种解决方案

一、base中重新安装pytorch
二、pytorch中安装jupyter notebook
这里选择第二种方法
首先

conda activate pytorch

进入到pytorch环境中去


在pytorch环境中看包

conda list


没有我们需要的包,因此输入命令,进行下载jupyter

conda install nb_conda_kernels

进行下载
下载完成后输入命令:

jupyter notebook

打开jupyter notebook
注:我再输入的时候出现了一些无法定位的提示,但是我的电脑没有影响使用jupyter,还是可以使用jupyter并且可以import torch

点击确定,就可以来到jupyter notebook的页面了

让我们来验证一下


成功!!!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/857406.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号