-
Notifications
You must be signed in to change notification settings - Fork 132
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
Runtime checks for declare_same_as #1200
Comments
Note there is this warning, which is actually not triggered here (I think): # Note: Instead of making this a warning, we could also enforce this at some point.
# The user should be able to fix `extern_data` in the config such that this is correct in the first place.
# Also, in addition to this warning, we might want to add some runtime check on the eq of the dyn sizes.
print(
"Warning: assuming dim tags are same with different size placeholders: %r vs %r" % (
self.dyn_size, other_same_base.dyn_size)) |
Note there is |
One thing we should do here: For this example case:
In More generally: Instead of #1143, #1141, maybe we should make a runtime check here? |
In #975, there is the discussion to completely remove |
To answer this question: The problem here was that we actually did manual dim math. In
LearnedRelativePositionalEncoding
, we had:And:
I.e.:
But the
declare_same_as
anyway just overwrote this.Maybe in this case, we could have detected this statically. But in the general case, there are always cases where we can not detect this at compilation time, and only at runtime.
At some point, we planned to actually add such runtime checks for
declare_same_as
. Maybe this is a reminder. This would have allowed to much more easily detect this problem.Originally posted by @albertz in rwth-i6/returnn_common#238 (comment)
The text was updated successfully, but these errors were encountered: