Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jotix16
Copy link
Contributor

@jotix16 jotix16 commented Jun 1, 2021

Now task=search should work as intended.

"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},
Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Member

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.

Copy link
Contributor Author

@jotix16 jotix16 Jun 1, 2021

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.

@jotix16 jotix16 force-pushed the transducer_search_problem branch from dcae584 to 0862712 Compare June 1, 2021 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants