{"record":{"id":"b445f87e330aac25","repo":"tracel-ai/burn","slug":"conv-transpose3d-unsupported-dtype","errorCode":null,"errorMessage":"conv_transpose3d: unsupported dtype {:?}","messagePattern":"conv_transpose3d: unsupported dtype (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-flex/src/ops/module.rs","lineNumber":304,"sourceCode":"            DType::F64 => conv_transpose::conv_transpose2d_f64(x, weight, bias, &options),\n            DType::F16 => conv_transpose::conv_transpose2d_f16(x, weight, bias, &options),\n            DType::BF16 => conv_transpose::conv_transpose2d_bf16(x, weight, bias, &options),\n            dtype => panic!(\"conv_transpose2d: unsupported dtype {:?}\", dtype),\n        }\n    }\n\n    fn conv_transpose3d(\n        x: FloatTensor<Flex>,\n        weight: FloatTensor<Flex>,\n        bias: Option<FloatTensor<Flex>>,\n        options: ConvTransposeOptions<3>,\n    ) -> FloatTensor<Flex> {\n        match x.dtype() {\n            DType::F32 => conv_transpose::conv_transpose3d_f32(x, weight, bias, &options),\n            DType::F64 => conv_transpose::conv_transpose3d_f64(x, weight, bias, &options),\n            DType::F16 => conv_transpose::conv_transpose3d_f16(x, weight, bias, &options),\n            DType::BF16 => conv_transpose::conv_transpose3d_bf16(x, weight, bias, &options),\n            dtype => panic!(\"conv_transpose3d: unsupported dtype {:?}\", dtype),\n        }\n    }\n\n    fn avg_pool2d(\n        x: FloatTensor<Flex>,\n        kernel_size: [usize; 2],\n        stride: [usize; 2],\n        padding: [usize; 2],\n        count_include_pad: bool,\n        ceil_mode: bool,\n    ) -> FloatTensor<Flex> {\n        match x.dtype() {\n            DType::F32 => pool::avg_pool2d_f32(\n                x,\n                kernel_size,\n                stride,\n                padding,\n                count_include_pad,","sourceCodeStart":286,"sourceCodeEnd":322,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-flex/src/ops/module.rs#L286-L322","documentation":"conv_transpose3d in the burn-flex backend dispatches on input dtype to conv_transpose3d_f32/f64/f16/bf16 kernels; any other dtype triggers the panic. As with all conv/conv-transpose ops, only float tensors are valid, and the dynamic-dtype backend detects violations only at runtime.","triggerScenarios":"Calling conv_transpose3d with a tensor of dtype I8/I16/I32/I64/U8/Bool/etc.; decoding quantized 3D latents (volumetric GAN/autoencoder outputs) stored as integers.","commonSituations":"3D generative models (medical volume synthesis, video voxel decoders) consuming int-quantized latents; data pipelines saving latents as int8 for storage and forgetting to convert on load.","solutions":["Cast the latent/input to float before conv_transpose3d: x.cast(DType::F32).","If latents are persisted as integers, dequantize/cast immediately after loading, before the decoder stack.","Check .dtype() on input and weights just before the call to trace the origin of the mismatch.","Extend the dtype match in crates/burn-flex/src/ops/module.rs conv_transpose3d if a new dtype is required."],"exampleFix":"// before\nlet vol = conv_transpose3d(stored_latent_i8, weight, bias, options);\n// panic: conv_transpose3d: unsupported dtype I8\n\n// after\nlet x = stored_latent_i8.cast(burn::tensor::DType::F32);\nlet vol = conv_transpose3d(x, weight, bias, options);","handlingStrategy":"validation","validationCode":"if !matches!(x.dtype(), DType::F32 | DType::F64 | DType::F16 | DType::BF16) {\n    x = x.cast(DType::F32);\n}\nlet vol = conv_transpose3d(x, weight, bias, options);","typeGuard":"fn is_float(t: &Tensor<Flex>) -> bool {\n    matches!(t.dtype(), DType::F32 | DType::F64 | DType::F16 | DType::BF16)\n}","tryCatchPattern":"let vol = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| conv_transpose3d(x.clone(), w.clone(), b.clone(), opts.clone())))\n    .unwrap_or_else(|_| conv_transpose3d(x.cast(DType::F32), w, b, opts));","preventionTips":["Store latents as float (or store scale/zero-point and dequantize on load).","Cast immediately after loading int-quantized 3D latents, before the decoder.","Keep a round-trip save/load test that asserts latent dtype is preserved.","Print dtype at each decoder stage when debugging new 3D models."],"tags":["burn","dtype","panic","conv-transpose","backend"],"backgroundTag":"unsupported-dtype","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"}