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

Engine search, do not fall back to default_target #1136

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions returnn/tf/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2313,11 +2313,7 @@ def search(self, dataset, do_eval=True, output_layer_names="output", output_file
print("Given output %r has beam %s." % (output_layer, out_beam), file=log.v1)
output_layer_beam_scores.append(output_layer.get_search_choices().beam_scores)
out_beam_sizes.append(out_beam.beam_size if out_beam else None)
target_key = output_layer.target
if output_layer.output.sparse and not target_key:
# Use the default target key for sparse outputs
target_key = self.network.extern_data.default_target
target_keys.append(target_key)
target_keys.append(output_layer.target)

out_cache = None
seq_idx_to_tag = {}
Expand Down