diff --git a/tflite/src/ops/nn.rs b/tflite/src/ops/nn.rs index 67aec5a18f..2d9d4ccb1d 100644 --- a/tflite/src/ops/nn.rs +++ b/tflite/src/ops/nn.rs @@ -139,7 +139,8 @@ fn de_softmax(op: &mut DeserOp) -> TractResult> { let input = args_1!(op.facts()?); let options = builtin!(op, builtin_options_as_softmax_options); ensure!(options.beta() == 1.0); - let softmax = core::nn::Softmax { axes: tvec!(input.rank() - 1), quant_output_dt: input.datum_type }; + let quant_output_dt = Some(input.datum_type).filter(|dt| !dt.is_float()); + let softmax = core::nn::Softmax { axes: tvec!(input.rank() - 1), quant_output_dt }; op.ctx.target.wire_node(op.prefix, softmax, op.inputs) }