Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ab5f1a

Browse files
yzhang87copybara-github
authored andcommitted
Quick fix when language_id in in_map for pipelined model.
PiperOrigin-RevId: 436102423
1 parent ce3694c commit 8ab5f1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lingvo/core/conformer_layer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,8 @@ def _FProp(self, theta, in_nmap):
965965
# TODO(ngyuzh,yuanzx): fix pipelined layer so don't need pass it manually.
966966
if 'language_vector' in in_nmap:
967967
out_nmap.language_vector = in_nmap.language_vector
968+
if 'language_id' in in_nmap:
969+
out_nmap.language_id = in_nmap.language_id
968970
inputs = self.final_ln.FProp(theta.final_ln, inputs)
969971
inputs, paddings = self._CastToFPropDtype((inputs, paddings))
970972
out_nmap.features = inputs

0 commit comments

Comments
 (0)