The model does the work, not the code. The inference code should be generic autoregressive decoding that would work with any transformer checkpoint. If your generation loop contains addition-specific logic — manually pairing digits, threading carry state, indexing into specific positions — then the Python code is solving the problem, not the model.
auto log_probs = model.ctc_decoder()(encoder_out);
,推荐阅读夫子获取更多信息
Последние новости
Фото: Christian Charisius / Pool / Reuters