Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
horheynm committed Feb 5, 2024
1 parent d353357 commit 6137ef2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sparsezoo/utils/onnx/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,9 @@ def get_node_weight(
raise Exception(f"Parameter for {node.name} not found")

# some weights are not accessible, and returns the zero_points, which are scalars
if weight is not None and weight.size > 1:
return weight
return None
if weight is not None and weight.ndim == 0:
return None
return weight


def get_layer_and_op_counts(
Expand Down

0 comments on commit 6137ef2

Please sign in to comment.