From 6a06d6b30c5ed7d90ef80147815503150363963d Mon Sep 17 00:00:00 2001 From: Mathieu Poumeyrol Date: Thu, 14 Dec 2023 10:00:03 +0100 Subject: [PATCH] one more issue --- tflite/src/ops/nn.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) }