{"record":{"id":"b92918d789cdad87","repo":"tracel-ai/burn","slug":"asymmetric-padding-is-not-yet-supported-for-conv3d","errorCode":null,"errorMessage":"Asymmetric padding is not yet supported for conv3d","messagePattern":"Asymmetric padding is not yet supported for conv3d","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-tensor/src/tensor/module.rs","lineNumber":161,"sourceCode":"/// Asymmetric 3D padding is not yet supported.\n/// The deprecated [`PaddedConvOptions`](crate::ops::PaddedConvOptions) is also\n/// accepted for compatibility.\npub fn conv3d(\n    x: Tensor<5>,\n    weight: Tensor<5>,\n    bias: Option<Tensor<1>>,\n    options: impl Into<ConvOptions<3>>,\n) -> Tensor<5> {\n    let options = options.into();\n    check!(TensorCheck::conv(\n        \"conv3d\",\n        x.dims(),\n        weight.dims(),\n        options.groups,\n    ));\n\n    if options.is_asymmetric() {\n        panic!(\"Asymmetric padding is not yet supported for conv3d\");\n    }\n\n    Tensor::new(BridgeTensor::float(Dispatch::conv3d(\n        x.primitive.into_float(),\n        weight.primitive.into_float(),\n        bias.map(|b| b.primitive.into_float()),\n        options,\n    )))\n}\n\n/// Applies a [Deformable 2D convolution](burn_backend::ops::ModuleOps::deform_conv2d).\npub fn deform_conv2d(\n    x: Tensor<4>,\n    offset: Tensor<4>,\n    weight: Tensor<4>,\n    mask: Option<Tensor<4>>,\n    bias: Option<Tensor<1>>,\n    options: DeformConvOptions<2>,","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-tensor/src/tensor/module.rs#L143-L179","documentation":"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.","triggerScenarios":"Thrown at crates/burn-tensor/src/tensor/module.rs:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}