-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
Description
Right now, the framework forces every layer to do the following to get the corresponding output scaling factors:
fn quantize_op<S: ScalingStrategy>(
self,
data: &S::AuxData,
node_id: NodeId,
input_scaling: &[ScalingFactor],
) -> anyhow::Result<QuantizeOutput<Self::QuantizedOp>> {
let mut output_scalings = S::scaling_factors_for_node(data, node_id, 1);
ensure!(
output_scalings.len() == 1,
"Output scaling for convolution layer different from 1"
);
...The process could be streamlined if we directly give the output scaling factors as well, since the trait ScalingStrategy can only be used for that anyway.
Reactions are currently unavailable