{"record":{"id":"2ef0e9b6ee8efa45","repo":"tracel-ai/burn","slug":"lanczos3-interpolation-backward-is-not-supported-f","errorCode":null,"errorMessage":"lanczos3 interpolation backward is not supported for ndarray backend","messagePattern":"lanczos3 interpolation backward is not supported for ndarray backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-ndarray/src/ops/module.rs","lineNumber":362,"sourceCode":"        grad: FloatTensor<Self>,\n        output_size: [usize; 2],\n        options: InterpolateOptions,\n    ) -> FloatTensor<Self> {\n        match options.mode {\n            InterpolateMode::Nearest => module_op!(inp(x, grad), opt(), E, |x, grad| {\n                nearest_interpolate_backward::<E>(x, grad, output_size).into()\n            }),\n            InterpolateMode::NearestExact => {\n                panic!(\"nearest exact interpolation backward is not supported for ndarray backend\")\n            }\n            InterpolateMode::Bilinear => {\n                panic!(\"bilinear interpolation backward is not supported for ndarray backend\")\n            }\n            InterpolateMode::Bicubic => {\n                panic!(\"bicubic interpolation backward is not supported for ndarray backend\")\n            }\n            InterpolateMode::Lanczos3 => {\n                panic!(\"lanczos3 interpolation backward is not supported for ndarray backend\")\n            }\n        }\n    }\n\n    fn conv3d(\n        x: FloatTensor<Self>,\n        weight: FloatTensor<Self>,\n        bias: Option<FloatTensor<Self>>,\n        options: ConvOptions<3>,\n    ) -> FloatTensor<Self> {\n        module_op!(inp(x, weight), opt(bias), E, |x, weight, bias| conv3d::<E>(\n            x, weight, bias, options\n        )\n        .into())\n    }\n\n    fn conv_transpose3d(\n        x: FloatTensor<Self>,","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-ndarray/src/ops/module.rs#L344-L380","documentation":"Unimplemented-feature panic: the ndarray backend's `interpolate_backward` supports only the Nearest mode's gradient; NearestExact, Bilinear, and Lanczos3 modes have no backward implementation on CPU/ndarray, so requesting upsampling backward with those modes panics. The failing input is the InterpolateOptions mode on the backward pass.","triggerScenarios":"Backpropagating through an interpolate node using InterpolateMode::Lanczos3 with the burn-ndarray backend.","commonSituations":"Training pipelines that use Lanczos3 resampling (high-quality image resize) inside the autodiff graph on CPU.","solutions":["Use InterpolateMode::Nearest for training on ndarray; keep Lanczos3 for inference-only preprocessing","Move the Lanczos3 resize outside the model (preprocess data before the graph)","Use a backend that supports Lanczos3 backward, if available"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert!(matches!(mode, InterpolateMode::Nearest), \"ndarray supports only nearest interpolate backward\");","typeGuard":"fn is_ndarray_backward_safe(mode: &InterpolateMode) -> bool {\n    matches!(mode, InterpolateMode::Nearest)\n}","tryCatchPattern":null,"preventionTips":["Do Lanczos3 resizing outside the autodiff graph","Validate interpolation config at model construction time"],"tags":["rust","burn-ndarray","autodiff","unsupported-op"],"backgroundTag":"unsupported-op-backend","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"}