上采样的几种方式
摘要:1.插值 import torch.nn.functional as F //init中 self.up = nn.Upsample(size = (256, 2), mode = "nearest") //forward中 F.interpolate(input, size=None, scale
阅读全文
posted @
2023-10-26 20:14
孜孜不倦fly
阅读(47)
推荐(0) 编辑
深度学习设置随机数种子
摘要:seed = 2023 torch.manual_seed(seed) # torch的CPU随机性,为CPU设置随机种子 torch.cuda.manual_seed(seed) # torch的GPU随机性,为当前GPU设置随机种子 torch.cuda.manual_seed_all(seed
阅读全文
posted @
2023-10-22 11:17
孜孜不倦fly
阅读(119)
推荐(0) 编辑