Replace Clone() with View() (#432)

Co-authored-by: hiedean <hiedean@tju.edu.cn>
This commit is contained in:
HieDean
2023-11-20 09:20:50 +08:00
committed by GitHub
parent ac00edab5b
commit e6a2d0da3b
5 changed files with 14 additions and 12 deletions

View File

@@ -120,7 +120,7 @@ void OnlineTransducerModifiedBeamSearchDecoder::Decode(
cur_encoder_out =
Repeat(model_->Allocator(), &cur_encoder_out, hyps_row_splits);
Ort::Value logit = model_->RunJoiner(
std::move(cur_encoder_out), Clone(model_->Allocator(), &decoder_out));
std::move(cur_encoder_out), View(&decoder_out));
float *p_logit = logit.GetTensorMutableData<float>();
LogSoftmax(p_logit, vocab_size, num_hyps);