我正在尝试将 PyTorch 的 nn.Conv3d 用于具有 AMD GPU 的系统中的卷积自动编码器。我们有最新的 ROCM (4.5) 和 MIOpen (2.14)。相同的训练脚本适用于 NVIDIA GPU。我设法使用 nn.Conv2D 进行了相同的培训,但是,对于 Conv3D,我得到了这个错误:
return forward_call(*input, **kwargs)
File ".../lib/python3.9/site-packages/torch/nn/modules/conv.py", line 587, in forward
return self._conv_forward(input, self.weight, self.bias)
File ".../lib/python3.9/site-packages/torch/nn/modules/conv.py", line 582, in _conv_forward
return F.conv3d(
RuntimeError: miopenStatusUnknownError
MIOpen Error: /MIOpen/src/ocl/convolutionocl.cpp:831: Forward Convolution cannot be executed due to incorrect params
这是网络:
class autoencoder(nn.Module):
def __init__(self):
super(autoencoder, self).__init__()
self.conv_en = nn.Conv3d(in_channels=3, out_channels=32, kernel_size=3, stride=1, padding=1)
def forward(self, inp_x):
x = self.conv_en(inp_x)
这是训练循环:
for inputs, labels in train_loader:
inputs = inputs.permute(0,2,1,3,4).to(torch.device('cuda'))
predictions = distrib_model(inputs)
有任何想法吗?