Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Comment thread
MatteoFasulo marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ This file contains the changelog for the Deeploy project. The changelog is divid
- Fixed multiple typos in variable and method names, such as changing `includeGobalReferences` to `includeGlobalReferences` and `dicardedMappers` to `discardedMappers`
- Corrected method usage in `importDeeployState` to call `NetworkContext.importNetworkContext` instead of the incorrect method name
- Correctly return `signProp` from `setupDeployer` instead of hardcoding the value to `False` in `testMVP.py`
- Fixed `Squeeze` Op. when using ONNX opset 13 or higher (from attribute to input)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

### Removed
- Delete outdated and unused `.gitlab-ci.yml` file
Expand Down
16 changes: 13 additions & 3 deletions Deeploy/Targets/Generic/Parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,17 @@ def __init__(self):

def parseNode(self, node: gs.Node) -> (bool):

ret = all(['axes' in node.attrs, len(node.inputs) == 1, len(node.outputs) == 1])
# ONNX v11: 'axes' is a node attribute
if 'axes' in node.attrs:
ret = all(['axes' in node.attrs, len(node.inputs) == 1, len(node.outputs) == 1])
# ONNX v13+: 'axes' becomes an input together with the data (source: https://onnx.ai/onnx/operators/onnx__Squeeze.html)
else:
ret = all([len(node.inputs) == 2, len(node.outputs) == 1])

if ret:
if ret and 'axes' in node.attrs:
self.operatorRepresentation['axes'] = node.attrs['axes']
elif ret:
self.operatorRepresentation['axes'] = node.inputs[1]

return ret

Expand All @@ -952,7 +959,10 @@ def parseNodeCtxt(self,
node: gs.Node,
channels_first: bool = True) -> Tuple[NetworkContext, bool]:

inputs = ['data_in']
if len(node.inputs) == 1:
inputs = ['data_in']
else:
inputs = ['data_in','axes']
outputs = ['data_out']

for idx, inputNode in enumerate(node.inputs):
Expand Down