-
Notifications
You must be signed in to change notification settings - Fork 132
Specify expected output shape for verification #706
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
Comments
Another open question: Should this also include extra (implicit) dimensions from |
Also: Should this include a potential (implicit) sparse dimension (when |
When we add those implicit dimensions ( Or do we want to have two variants of |
Yea, I think being able to specify these implicit dims too would be good.
I'm not sure, probably it's not too annoying to have to explicitly specify all implicit dimensions. There aren't used too frequently anyway, and are easy to specify. Apart from including implicit dims somehow, I think it's important to also mark them as being virtual. I think I like it more if you only have one shape. Just like you would write it out on paper or in comments - it should be relatively simple to understand and intuitive. |
Another aspect: When we now discuss about multiple options (not just The options of So, the proposed But maybe it is simpler for the user to have it as a separate option |
I think we agreed that when implicit dimensions are specified, they should be marked clearly as implicit somehow. E.g. like:
To clarify: Do we want Do we want Do we want some other options to separately specify implicit dimension? Maybe So maybe Or also additionally Or only |
I would want to make it as easy as possible to specify these explicit and implicit dims for the user.
For Returnn Common, I would still find it very cool to use type annotations to specify this Do we want to force the user to specify implicit dims if they specify |
Yes. That's basically also what I suggested in my last post. So, which of these do you prefer? The second variant is slightly more flexible, as a user might just define
It's still early in its design phase. If you have some specific suggestion, please open some issue in returnn_common. Very related is this: rwth-i6/returnn_common#17
Yes.
No, the default would be
If we would do that, then I think we should just have one single Yes, I think this is good. The Should we differ between sparse dims and dyn size ext implicit dims? So then have one |
One other small thing, just to mention explicitly: The options we describe here are always for the canonical cases, not taking any optimization or other things into account. When RETURNN does some automatic optimization (e.g. moving out of rec layer), any layers should maybe adapt the corresponding options (including |
So, I wonder whether we should maybe this special marking optional. So e.g. for some sparse tensor, you could specify both This could maybe allow for future optimizations which make some dims implicit, or maybe other variants, like the dim is still there but more compressed, or so. Not sure. (I think I also had other reasons in mind, although I cannot remember right now.) |
Another related thing: The batch dim is kind of special, and can itself contain multiple dims (all handled in I wonder if It's also a question on the equality of dim tags (#634). When you specify |
Another thing to clarify: Without enforced unique dim tags (#632), it could happen that the set over dim tags (or implicit dim tags) collapses multiple dims. However, we want that My opinion is that this is fine anyway, and then later enforced unique dim tags (#632) would anyway fix this. |
This was one result of the discussion in #597, which is somewhat orthogonal to #597 though.
The proposal was to introduce the
out_shape
option, which is of typeset[DimensionTag]
.It's a
set
to emphasize that the order should never matter.Although for scalars, we might want to allow
()
as well.Maybe we can potentially also extend this, to allow integers (for static dimensions) and strings (e.g.
"B"
, viaget_axis_from_description
).This would only be used for verification.
The text was updated successfully, but these errors were encountered: