Open
Description
this is a small code to catch the problem:
`import torch
import torch_directml
import torch.nn as nn
device = torch_directml.device()
创建3D卷积层和五维输入
conv3d = nn.Conv3d(1, 1, kernel_size=3, padding=1).to(device)
x = torch.randn(1, 1, 16, 256, 256).to(device) # (B, C, D, H, W)
try:
output = conv3d(x)
print("3D卷积在DirectML下运行成功,输出维度:", output.shape)
except Exception as e:
print("错误信息:", e)`
python == 3.10
requirement.txt
what can i do to run the code successfully?
Metadata
Metadata
Assignees
Labels
No labels