-
Notifications
You must be signed in to change notification settings - Fork 40
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
Extension of channels last converter to models with branches #114
Open
nghielme
wants to merge
11
commits into
fastmachinelearning:main
Choose a base branch
from
nghielme:channels_last_branches
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Extension of channels last converter to models with branches #114
nghielme
wants to merge
11
commits into
fastmachinelearning:main
from
nghielme:channels_last_branches
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e problem now seems to be to move the transpose upwards before the fork and properly reconnect the network. Not sure either what I should do concerning the model tensor shape since I see that for the base case it is modified.
nghielme
commented
Apr 23, 2024
_channelsLast_node_types = list(channels_last.custom_op.keys()) | ||
|
||
# Nodes, which do not modify the shape of the tensor | ||
# And modify all values in the same way. | ||
_move_through_nodes = ["Quant", "Relu"] | ||
_move_through_nodes = ["Quant", "Relu", "LeakyRelu", "Resize"] |
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.
Not sure that Resize
should be in _move_through_nodes
list since it actually modifies the shape of the tensor
…etter though to handle them in the move up and down transformations
…e in which the transposes passes the special nodes. I added some cleaning transformation of the domain field, it is not very elegant but I think it is strictly necessary.
a removal of eventual input and output transposes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I extended channels last converted in order to work with models with branches.
I tested with a dummy model composed by a single fork node and with a complete UNet model with multiple fork nodes.