This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
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.
Add support for tf.nn.depth_to_space lambda #492
Add support for tf.nn.depth_to_space lambda #492
Changes from 5 commits
3289d66
5414adf
c6bcb14
04cb859
ad0eed4
dc5b397
981561a
877cd75
2631b37
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I still need some help, because here I have now set
n = -1
such that it is OK if the batch dimension is unknown. But what ifh
andw
are also unknown, i.e. their values areNone
. How to then do the reshapes below?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.
Good point here. This line has issue when the tensor shape is unknown (dynamic). Search our code base to find the case when
_cal_tensor_shape
isNone
. We need handle that -- Add aShape
op afternode.inputs[0]
to get the dynamic shape, and useSlice
op to geth
andw
, and concatenate with other dimensions to make thedesired_shape
. We have some examples in our code.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.
I had a look at an example and it is not trivial, code quickly becomes unreadable because of all the extra nodes added. Then in that case I reconsidered the use of the actual DepthToSpace node, so I worked on that a bit and made it work with two extra transposes. I've added a test case with unknown tensor sizes as well and that one now also passes :-) Could you have another look at the code? Thanks!