torch中,
我现在想把一个纬度为[bs, channel, depth, height, width]的3D tensor 通过nn.Upsample转换为 [bs, channel, depth, height*2, width*2]的tensor
则,init定义上采样是应为:
self.upsacle = nn.Upsample(scale_factor=tuple([1,2,2]))
2D及其他纬度以此类推。
参考:
torch中,
我现在想把一个纬度为[bs, channel, depth, height, width]的3D tensor 通过nn.Upsample转换为 [bs, channel, depth, height*2, width*2]的tensor
则,init定义上采样是应为:
self.upsacle = nn.Upsample(scale_factor=tuple([1,2,2]))
2D及其他纬度以此类推。
参考: