Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Nov 20, 2023
1 parent cd023dd commit 23af49b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test-rt/test-tflite/suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,5 @@ fn compatible_conv_q(qcp: &QConvProblem) -> bool {
{
return true;
}
return false;
false
}
2 changes: 1 addition & 1 deletion tflite/src/ops/cnn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn ser_conv(
&format!("{node_name}.weights"),
&conv.kernel,
&vec![k0_tract; conv.kernel.shape()[0]],
&kscale,
kscale,
0,
)?);
let bscale = kscale.iter().map(|k| k * iscale).collect_vec();
Expand Down
4 changes: 2 additions & 2 deletions tflite/src/ops/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ fn linearops_quantization_suport(
};
inputs.push(op.ctx.target.add_const(format!("{p}.k0"), k_zp.into_arc_tensor())?);
inputs.push(op.ctx.target.add_const(format!("{p}.kscale"), k_scale)?);
inputs.push(op.ctx.target.add_const(format!("{p}.i0"), rctensor0(iqp.zp_scale().0 as i32))?);
inputs.push(op.ctx.target.add_const(format!("{p}.i0"), rctensor0(iqp.zp_scale().0))?);
inputs.push(op.ctx.target.add_const(format!("{p}.iscale"), rctensor0(iqp.zp_scale().1))?);
inputs.push(op.ctx.target.add_const(format!("{p}.c0"), rctensor0(oqp.zp_scale().0 as i32))?);
inputs.push(op.ctx.target.add_const(format!("{p}.c0"), rctensor0(oqp.zp_scale().0))?);
inputs.push(op.ctx.target.add_const(format!("{p}.cscale"), rctensor0(oqp.zp_scale().1))?);
Ok(Some(oqp))
} else {
Expand Down

0 comments on commit 23af49b

Please sign in to comment.