Skip to content

Commit

Permalink
Fix: handling scalar vs. array scaling factor
Browse files Browse the repository at this point in the history
  • Loading branch information
i-colbert committed Mar 10, 2024
1 parent 29e6843 commit 13906da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qonnx/transformation/resize_conv_to_deconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def apply(self, model):
[q_w_name, q_s_name, q_zp_name, q_bw_name] = weight_prod.input
W_conv = model.get_initializer(q_w_name)
W_scale = model.get_initializer(q_s_name)
W_scale = np.moveaxis(W_scale, 0, 1)
if isinstance(W_scale, np.ndarray) and W_scale.ndim > 0:
W_scale = np.moveaxis(W_scale, 0, 1)
W_zeropt = model.get_initializer(q_zp_name)
W_bitwidth = model.get_initializer(q_bw_name)
W_signed = get_by_name(weight_prod.attribute, "signed").i
Expand Down

0 comments on commit 13906da

Please sign in to comment.