-
Notifications
You must be signed in to change notification settings - Fork 43
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
limit "t" and correct prev non blank so that task=search works #69
base: master
Are you sure you want to change the base?
Conversation
"am": {"class": "copy", "from": "am0" if search else "data:source"}, | ||
|
||
"prev_output_wo_b": { | ||
"class": "masked_computation", "unit": {"class": "copy", "initial_output": 0}, | ||
"from": "prev:output_", "mask": "prev:output_emit", "initial_output": 0}, |
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 don't understand. Why is this needed? Esp in search, this should have no effect.
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.
prev:output_
doesn't guarantee non_blank during search. Both are sparse, but it messes up the embedding that happens in slow_rnn
.
I get something like this:
TensorFlow exception: indices[0] = 1056 is not in [0, 1056)
[[node output/rec/slow_rnn/masked/input_embed/linear/embedding_lookup (defined at /Users/mikel/setups/rt4/returnn/returnn/tf/layers/basic.py:1468) ]]
Errors may have originated from an input operation.
Input Source operations connected to node output/rec/slow_rnn/masked/input_embed/linear/embedding_lookup:
output/rec/slow_rnn/masked/input_embed/linear/py_print_1/Identity (defined at /Users/mikel/setups/rt4/returnn/returnn/tf/util/basic.py:6245)
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.
Hm, this is strange. Haven't we used it always like this in the other configs as well? Why did the problem never occur? Also, I have used exactly this config, and it did not occur for me. How can that be?
What TensorFlow version do you use?
Also, maybe we should fix MaskedComputationLayer
instead? This can only happen for frames for slow_rnn
which will actually not be used (due to the masking). It does not really matter what we calculate in those masked-out frames. We could simply fix the input for the masked-out frames.
But first I want to understand better why this happens now and not before, and not for me.
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.
Haven't we used it always like this in the other configs as well?
It looks the same in other configs, I don't get it either.
What TensorFlow version do you use?
2.4.1
This can only happen for frames for slow_rnn which will actually not be used (due to the masking)
Exactly.
But first I want to understand better why this happens now and not before, and not for me.
Here are my logs.
dcae584
to
0862712
Compare
Now task=search should work as intended.