-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve parsing of PyTorch functional layers arguments #923
Conversation
….layer_norm and substract
….layer_norm and substract
tests/pytorch_tests/model_tests/feature_models/layer_norm_net_test.py
Outdated
Show resolved
Hide resolved
….layer_norm and substract
….layer_norm and substract
….layer_norm and substract
|
||
# If function inputs and arguments requires specific order, sort it before the call | ||
elif isinstance(n, FunctionalNode) and n.op_call_args_order and not (len(n.op_call_args_order) > len(input_tensors + op_call_args)): | ||
args = [(input_tensors + op_call_args)[ind] for ind in n.op_call_args_order] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add and example of an operation for each one in the comments so it will be more clear?
@@ -0,0 +1,66 @@ | |||
# Copyright 2024 Sony Semiconductor Israel, Inc. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a feature model test or a layer test? If layer there is a library for layer tests maybe add it there
..._compression_toolkit/core/pytorch/graph_substitutions/substitutions/functional_layer_norm.py
Outdated
Show resolved
Hide resolved
..._compression_toolkit/core/pytorch/graph_substitutions/substitutions/functional_layer_norm.py
Outdated
Show resolved
Hide resolved
….layer_norm and substract
Pull Request Description:
Support PyTorch nn.functional.layer_norm and add a relevant test.
Checklist before requesting a review: