
Pytorch
夏梦星晨
Change the world by mathematics and program
展开
-
UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argume
同一个代码,在俩个不同的服务器上跑,其中一个会诱发上述的警告,另外一个却不会,猜测应该是不同服务器上Pytorch版本不一致的问题。传入参数“indexing"即可。原创 2023-07-06 10:46:22 · 8418 阅读 · 0 评论 -
Pytorch随机数种子设置确保实验可复现
【代码】Pytorch随机数种子设置确保实验可复现。原创 2022-09-19 21:15:37 · 623 阅读 · 0 评论 -
torchvision.transforms.Pad和torchvision.transforms.functional.pad的区别
from torchvision import transforms as Tfrom torchvision.transforms import functional as FT.PadF.pad早上在学习FCN语义分割的文章时,遇到了F.pad,当时纳闷,其与T.pad的区别,然后分别看了下torchvision.transforms的源码,根据个人的理解,区别如下:T.Pad是一个类,该类里面的forward函数里面返回的就是F.pad。F.pad是一个函数,可以赋值给另外一个变.原创 2022-04-12 10:49:33 · 1461 阅读 · 0 评论 -
Apex安装
最近学习SwinTransformer的时候,需要安装apex原创 2022-03-18 09:56:18 · 4899 阅读 · 2 评论 -
torch.size()的理解
import torchx = torch.zeros((5, 2, 3, 4))print(x.size())print(x)(5, 2, 3, 4)分别表示(batch size, channel, height, width)原创 2021-12-11 10:44:09 · 10918 阅读 · 0 评论