Closed hoang-ho closed 6 years ago
@kaihoang I'm definitely no export on t2t-trainer yet but I think just running the t2t_trainer.py
file should work.
Here is an excerpt of what I am doing in one of my test scripts were I"inject" command line args and then just call t2t_trainer.main(None)
:
import sys
from tensor2tensor.bin import t2t_trainer
from tensor2tensor.utils.metrics import METRICS_FNS
# ...
METRICS_FNS['word_error_rate'] = word_error_rate
if __name__ == '__main__':
argv = [
'--generate_data',
'--problem', 'librispeech',
'--model', 'transformer',
# ..
]
sys.argv += argv
t2t_trainer.main(None)
Have you tried to run other examples on your Windows machine? Maybe try to run the MNIST problem to see if things work.
It can run on windows. I tried mnist.
I set is_single_machine = True
@guotong1988 Hmm.. no idea then. Sorry.
Thank you for all the replies. I haven't yet figured out why the model didn't run on my system. It may be due to some issues with how my system is set up. I switched to Linux system and rebuild everything. The model works now. Thank you again
@kaihoang You're welcome. Glad it works now for you.
@kaihoang I have a suspicion: As I generated my own dataset I had an exception thrown. However, under mydataset/data
the shards where created - although without any content. Each file had just 0 bytes. As I started t2t-trainer
I saw the same behavior that you described: t2t-trainer
starts, creates the model and then stops training without any errors.
If you're still able to do so you might want to check your dataset files and whether they were generated correctly.
Description
I'm very new to Tensor2Tensor and am trying to use Tensor2Tensor for text summarization. As I run the following command:
on a Windows 10 machine. I received the following result:
...
From here, it just stops training. I tried to run the model on Google Colab before, and the model there just kept on running until the very end. One side note is that when I use pip install to install tensor2tensor on Windows, there is no binary files for t2t_datagen or t2t_trainer installed. Hence, I have to use
to run for t2t_trainer. Is this the reason why tensor2tensor doesn't train? Would anyone here please help me with this error? Thank you very much.