Closed ttpro1995 closed 5 years ago
I encountered the same problem. This code base run smoothly with this docker image tensorflow/tensorflow:latest-gpu (without the py3)
I found the solution
With docker image tensorflow/tensorflow:latest-gpu-py3
Running with environment variablePYTHONIOENCODING=utf-8
will fix the problem, without needing to change any code
Full command line
PYTHONIOENCODING=utf-8 python3 -m nmt.nmt \
--run_name=vastai_attention_scaled_luong_1 \
--attention=scaled_luong \
--src=vi --tgt=en \
--vocab_prefix=/data/nlp/iwslt15/vocab \
--train_prefix=/data/nlp/iwslt15/train \
--dev_prefix=/data/nlp/iwslt15/tst2012 \
--test_prefix=/data/nlp/iwslt15/tst2013 \
--out_dir=/home/tt/model/nmt_model/vastai_attention_scaled_luong_1 \
--num_train_steps=12000 \
--steps_per_stats=100 \
--num_layers=2 \
--num_units=512 \
--dropout=0.2 \
--encoder_type=bi \
--metrics=bleu
I run with docker image tensorflow/tensorflow:latest-gpu-py3
with command
It error