自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

转载 Deep Learning 最优化方法

链接:https://blog.csdn.net/BVL10101111/article/details/72615961

2018-06-21 09:23:17 295

原创 pytorch警告解决方案

安装的pytorch版本: 遇到的问题: 1.UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number losses.update(loss.data[0...

2018-06-08 19:30:16 5828

原创 pytorch之numpy,tensor,variable转换

1.将numpy矩阵转换为Tensor张量locs= torch.from_numpy(loc) #loc为numpy类型 2.将Tensor张量转化为numpy矩阵locs1 = locs.numpy() 3.将numpy转换为Variablelocs2= Variable(torch.from_numpy(locs1)) 4.将Varia...

2018-06-07 21:55:43 1945

原创 pytorch函数问题总结

对模型进行验证 model.eval()

2018-06-07 21:14:14 884

转载 Pytorch之指定GPU

转自:http://www.cnblogs.com/darkknightzh/p/6836568.html PyTorch默认使用从0开始的GPU,如果GPU0正在运行程序,需要指定其他GPU。有如下两种方法来指定需要使用的GPU。1. 类似tensorflow指定GPU的方式,使用CUDA_VISIBLE_DEVICES。1.1 直接终端中设定:CUDA_VISIBLE...

2018-06-02 20:05:00 635

原创 Pytorch之GPU模型加载在CPU上

直接在GPU上加载: pretrain = torch.load(opt.pretrain_path) model.load_state_dict(pretrain['state_dict'])将GPU模型加载在CPU上: pretrain = torch.load(opt.pretrain_path, map_location=lambda storage, loc: stora...

2018-06-02 17:30:41 8599 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除