from local
This commit is contained in:
parent
ef9c392c5b
commit
3d1ff70da4
Binary file not shown.
Binary file not shown.
@ -415,6 +415,14 @@ def decode_one_batch(
|
|||||||
return {key: hyps}
|
return {key: hyps}
|
||||||
|
|
||||||
if params.method == "greedy-search":
|
if params.method == "greedy-search":
|
||||||
|
att_loss = mmodel.decoder_forward(
|
||||||
|
encoder_memory,
|
||||||
|
memory_mask,
|
||||||
|
token_ids=unsorted_token_ids,
|
||||||
|
sos_id=graph_compiler.sos_id,
|
||||||
|
eos_id=graph_compiler.eos_id,
|
||||||
|
warmup=warmup,
|
||||||
|
)
|
||||||
hyps = greedy_search(nnet_output, memory_key_padding_mask)
|
hyps = greedy_search(nnet_output, memory_key_padding_mask)
|
||||||
|
|
||||||
# hyps is a list of str, e.g., ['xxx yyy zzz', ...]
|
# hyps is a list of str, e.g., ['xxx yyy zzz', ...]
|
||||||
|
|||||||
Reference in New Issue
Block a user