-
Notifications
You must be signed in to change notification settings - Fork 133
Change warning for placeholder size to exception #1143
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
base: master
Are you sure you want to change the base?
Changes from 18 commits
30e8568
f5df789
5374abb
b191839
d5acc2e
a14f1df
d18cb30
2105a37
c6b5023
28b3985
6ea93f1
da2fed7
59bae84
49d9960
3820bc7
8ae0cbd
2ebc9fc
51850fc
ac94057
b6883e2
d283da7
33d7ebf
41608db
7aa2303
c407835
3538108
7df2a58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
import traceback | ||
|
||
import returnn.util.basic as util | ||
from returnn.util.basic import NotSpecified, Entity | ||
from returnn.util.basic import BehaviorVersion, NotSpecified, Entity | ||
import returnn.tf.compat as tf_compat | ||
|
||
|
||
|
@@ -998,12 +998,11 @@ def declare_same_as(self, other): | |
if self.dyn_size is not None and other_same_base.dyn_size is not None: | ||
|
||
if self.dyn_size is not other_same_base.dyn_size: | ||
if self.batch == other_same_base.batch and self.control_flow_ctx == other_same_base.control_flow_ctx: | ||
# 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)) | ||
BehaviorVersion.require( | ||
False, | ||
"Dim tags are same with different size placeholders (%r vs %r), please check external_data" % ( | ||
self.dyn_size, other_same_base.dyn_size), | ||
15) | ||
# If we have a defined source, and this is a dynamic spatial axis, and it was undefined before, | ||
albertz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# maybe we can overtake the size_placeholder now. | ||
if other_same_base.dyn_size is not None and self.src_data: | ||
|
Uh oh!
There was an error while loading. Please reload this page.