2020年8月29日

nn.Linear nn.Conv2d nn.BatchNorm2d

摘要: conv,BN,Linear conv:https://blog.csdn.net/Strive_For_Future/article/details/83240232 1)conv2d.weight shape=[输出channels,输入channels,kernel_size,kernel_s 阅读全文

posted @ 2020-08-29 18:10 cltt 阅读(528) 评论(0) 推荐(0) 编辑

pytorch 中tensor在CPU和GPU之间转换

摘要: 1. CPU tensor转GPU tensor: cpu_imgs.cuda()2. GPU tensor 转CPU tensor: gpu_imgs.cpu()3. numpy转为CPU tensor: torch.from_numpy( imgs )4.CPU tensor转为numpy数据: 阅读全文

posted @ 2020-08-29 10:07 cltt 阅读(2849) 评论(0) 推荐(0) 编辑

导航