You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 1, 2025. It is now read-only.
It seems that 1D dilations for torch's nn.Conv1d() layers is not currently supported:
location: ../../lib/Importer/ONNXModelLoader.cpp:557 message: Conv: dilations must be specified for 2 axes.
And from ONNXModelLoader.cpp, around the line 557:
if (dict.count("dilations")) {
std::vector<unsigned_t> dilations(2, 1);
dilations = getShape<unsigned_t>(dict.at("dilations"));
RETURN_ERR_IF_NOT(dilations.size() == 2,
"Conv: dilations must be specified for 2 axes.");
RETURN_ERR_IF_NOT(dilations[1] == dilations[0],
"Conv: different dilation values along different axes "
"are not supported currently. values must be same.");
dilation = dilations[0];
}
Also, from that code, it looks like 3D convolutions are not supported either. So it looks like only 2D convolutions are supported. Is there a particular reason for this?
On the other hand, this (or similar) is what torch.onnx.export() produces for the torch.nn.Conv1d layer: