Hi,
I have found that NMT class of OpenNMT-py has (src,tgt,length) in its forward method.
When I do inferencing using Library — OpenNMT-py documentation. I have found that src have input text but tgt is NONE. How do I evaluate/pass tgt to forward().
Please help me to figure these src,tgt and length?
By default, TGT is not needed to perform inference. Indeed, the goal of inference is to produce a TGT sequence…
This arg is there to allow gold score computation. See:
OK. So decoder uses this TGT for scoring.
I am trying to convert this OpenNMT-py model into ONNX. When I try to convert, it asked me about(src,tgt,length) as dummy input.
tgt (LongTensor): A target sequence passed to decoder.
Size ``(tgt_len, batch, features)``.
As for ONNX export, I’m not sure how realistic this would be, as you would need to redefine quite a bit of logic to use the model.
Have you tried CTranslate2?