Search code examples
pythontensorflowtensor2tensor

Is there an alternative to tpu_trainer_lib?


I have been trying to run google's tensor2tensor (https://github.com/tensorflow/tensor2tensor) locally but it chokes when it gets to this bit:

from tensor2tensor.tpu import tpu_trainer_lib

Which makes sense because I don't have TPUs in my Mac. Is there an alternative to that function?

Here's the error message

ModuleNotFoundError: No module named 'tensor2tensor.tpu'

Solution

  • You should probably be able to replace it with :

    from tensor2tensor.utils import trainer_lib

    And then call the appropriate methods from trainer_lib.