随笔分类 -  12pytorch

摘要:conda install pytorch torchvision cudatoolkit=10.2 去掉最后两个参数 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch==1.10.1+cu102 torchvision==0 阅读全文
posted @ 2022-09-06 10:55 cheng4632 阅读(78) 评论(0) 推荐(0) 编辑
摘要:torch.save() ''' 模型保存: 1,保存整个网络模型,网络结构+权重参数 torch.save(model,'net.pth') 2,只保存模型的权重 torch.save(model.state_dict(),'net_params.pth') 参数(速度快,占内存少) 3,保存加载 阅读全文
posted @ 2022-06-22 14:56 cheng4632 阅读(252) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示