tracel-ai/burn · error
conv_transpose3d: unsupported dtype {:?}
Error message
conv_transpose3d: unsupported dtype {:?} What it means
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.
Source
Thrown at crates/burn-flex/src/ops/module.rs:304
DType::F64 => conv_transpose::conv_transpose2d_f64(x, weight, bias, &options),
DType::F16 => conv_transpose::conv_transpose2d_f16(x, weight, bias, &options),
DType::BF16 => conv_transpose::conv_transpose2d_bf16(x, weight, bias, &options),
dtype => panic!("conv_transpose2d: unsupported dtype {:?}", dtype),
}
}
fn conv_transpose3d(
x: FloatTensor<Flex>,
weight: FloatTensor<Flex>,
bias: Option<FloatTensor<Flex>>,
options: ConvTransposeOptions<3>,
) -> FloatTensor<Flex> {
match x.dtype() {
DType::F32 => conv_transpose::conv_transpose3d_f32(x, weight, bias, &options),
DType::F64 => conv_transpose::conv_transpose3d_f64(x, weight, bias, &options),
DType::F16 => conv_transpose::conv_transpose3d_f16(x, weight, bias, &options),
DType::BF16 => conv_transpose::conv_transpose3d_bf16(x, weight, bias, &options),
dtype => panic!("conv_transpose3d: unsupported dtype {:?}", dtype),
}
}
fn avg_pool2d(
x: FloatTensor<Flex>,
kernel_size: [usize; 2],
stride: [usize; 2],
padding: [usize; 2],
count_include_pad: bool,
ceil_mode: bool,
) -> FloatTensor<Flex> {
match x.dtype() {
DType::F32 => pool::avg_pool2d_f32(
x,
kernel_size,
stride,
padding,
count_include_pad,View on GitHub (pinned to d16f7ba2ed)
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.
Example fix
// before let vol = conv_transpose3d(stored_latent_i8, weight, bias, options); // panic: conv_transpose3d: unsupported dtype I8 // after let x = stored_latent_i8.cast(burn::tensor::DType::F32); let vol = conv_transpose3d(x, weight, bias, options);
Defensive patterns
Strategy: validation
Validate before calling
if !matches!(x.dtype(), DType::F32 | DType::F64 | DType::F16 | DType::BF16) {
x = x.cast(DType::F32);
}
let vol = conv_transpose3d(x, weight, bias, options); Type guard
fn is_float(t: &Tensor<Flex>) -> bool {
matches!(t.dtype(), DType::F32 | DType::F64 | DType::F16 | DType::BF16)
} Try / catch
let vol = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| conv_transpose3d(x.clone(), w.clone(), b.clone(), opts.clone())))
.unwrap_or_else(|_| conv_transpose3d(x.cast(DType::F32), w, b, opts)); Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- conv_transpose1d: unsupported dtype {:?}
- conv_transpose2d: unsupported dtype {:?}
- float_storage_as_f32: unsupported dtype {:?}
- conv1d: unsupported dtype {:?}
- conv2d: unsupported dtype {:?}
AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05).
Data as JSON: /api/errors/b445f87e330aac25.
Report an issue: GitHub.