THUMT icon indicating copy to clipboard operation
THUMT copied to clipboard

use cpu to inference

Open qpzhao opened this issue 4 years ago • 4 comments

Hi, How can I set params or modify "translator.py" for using cpu to inference?

qpzhao avatar Jul 23 '20 09:07 qpzhao

Unfortunately, the PyTorch implementation currently does not support CPU for inference.

Playinf avatar Aug 19 '20 07:08 Playinf

Unfortunately, the PyTorch implementation currently does not support CPU for inference.

Thanks. But I use tensorflow implementation. Does tensorlfow implementation support CPU for inference?

qpzhao avatar Aug 24 '20 02:08 qpzhao

@qpzhao Yes, the TensorFlow implementation supports inference with CPU.

GrittyChen avatar Aug 25 '20 06:08 GrittyChen

Hi, How can I set params or modify "translator.py" for using cpu to inference?

Now, the PyTorch implementation supports CPU for inference. You can add a parameter --cpu to make the translator.py work on the CPU. Note that when you use CPU to inference, you would not be allowed to use the --half parameter.

GrittyChen avatar Jul 30 '21 04:07 GrittyChen