Skip to content

Commit c52d07b

Browse files
authored
Simplify search flag logic (#947)
Use net search flag only as default fall back when search option is not explicitly provided for ChoiceLayer. DecideLayer and co will always apply. ChoiceLayer, new add_to_beam_scores option to control whether the score should be added to the beam when not doing search. Fix #946. Related: rwth-i6/returnn_common#18
1 parent 9b2db9e commit c52d07b

File tree

2 files changed

+110
-102
lines changed

2 files changed

+110
-102
lines changed

returnn/tf/layers/basic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10684,7 +10684,7 @@ def get_value(self):
1068410684
"""
1068510685
assert self.layer
1068610686
search_choices = self.layer.get_search_choices()
10687-
assert self.layer.network.search_flag and search_choices, "no search?"
10687+
assert search_choices, "no search?"
1068810688
# Negative score, because we minimize the loss, i.e. maximize the score.
1068910689
return self.reduce_func(-search_choices.beam_scores)
1069010690

0 commit comments

Comments
 (0)