tracel-ai/burn · error
Asymmetric padding is not yet supported for conv3d
Error message
Asymmetric padding is not yet supported for conv3d
What it means
Feature-limit guard in the high-level `conv3d`: the ConvOptions padding may be asymmetric per-side, but conv3d only supports symmetric padding (same value before/after each spatial dim); if `options.is_asymmetric()` the call panics. The failing input is ConvOptions with unequal padding per side on any of the 3 spatial dims.
Source
Thrown at crates/burn-tensor/src/tensor/module.rs:161
/// Asymmetric 3D padding is not yet supported.
/// The deprecated [`PaddedConvOptions`](crate::ops::PaddedConvOptions) is also
/// accepted for compatibility.
pub fn conv3d(
x: Tensor<5>,
weight: Tensor<5>,
bias: Option<Tensor<1>>,
options: impl Into<ConvOptions<3>>,
) -> Tensor<5> {
let options = options.into();
check!(TensorCheck::conv(
"conv3d",
x.dims(),
weight.dims(),
options.groups,
));
if options.is_asymmetric() {
panic!("Asymmetric padding is not yet supported for conv3d");
}
Tensor::new(BridgeTensor::float(Dispatch::conv3d(
x.primitive.into_float(),
weight.primitive.into_float(),
bias.map(|b| b.primitive.into_float()),
options,
)))
}
/// Applies a [Deformable 2D convolution](burn_backend::ops::ModuleOps::deform_conv2d).
pub fn deform_conv2d(
x: Tensor<4>,
offset: Tensor<4>,
weight: Tensor<4>,
mask: Option<Tensor<4>>,
bias: Option<Tensor<1>>,
options: DeformConvOptions<2>,View on GitHub (pinned to d16f7ba2ed)
Solutions
- Use symmetric padding: set padding so the before/after amounts are equal for each dim.
- Manually pad the input tensor (e.g. `x.pad(...)`) to emulate asymmetric padding and pass zero padding to conv3d.
- Crop the input or adjust kernel/stride so symmetric padding suffices.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/burn-tensor/src/tensor/module.rs:161 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05).
Data as JSON: /api/errors/b92918d789cdad87.
Report an issue: GitHub.