import torch
x = torch.randn(2,1,7,3)
conv = torch.nn.Conv2d(1,8,(2,3))
res = conv(x)
print(res.shape) # shape = (2, 8, 6, 1)
输入:[ batch_size, channels, height_1, width_1 ]
Conv2d的参数:[ channels, output, height_2, width_2 ]
import torch
x = torch.randn(2,1,7,3)
conv = torch.nn.Conv2d(1,8,(2,3))
res = conv(x)
print(res.shape) # shape = (2, 8, 6, 1)
输入:[ batch_size, channels, height_1, width_1 ]
Conv2d的参数:[ channels, output, height_2, width_2 ]