TypeError: unsupported operand type(s) for *: 'NoneType' and 'int' in keras_utils.py
trying to run trasformer in v2 with TF-2.0 stable and branch in models : tf_2_0_rc1(https://github.com/tensorflow/models/tree/tf_2_0_rc1) as per ticket https://github.com/tensorflow/models/issues/7644 with below command: python transformer_main.py --data_dir=$DATA_DIR --model_dir=$MODEL_DIR --vocab_file=$VOCAB_FILE --param_set=base --bleu_source=$DATA_DIR/newstest2014.en --bleu_ref=$DATA_DIR/newstest2014.de
Got error with below Stack trace:
Total params: 61,362,176 Trainable params: 61,362,176 Non-trainable params: 0
I1118 07:25:13.213394 139963829905152 transformer_main.py:298] Start train iteration at global step:0
Train for 1000 steps
/home/ubuntu/tf2py/lib/python3.5/site-packages/tensorflow_core/python/framework/indexed_slices.py:424: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
/home/ubuntu/tf2py/lib/python3.5/site-packages/tensorflow_core/python/framework/indexed_slices.py:424: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2019-11-18 07:25:42.524686: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10.0
INFO:tensorflow:BenchmarkMetric: {'epoch':0, 'time_taken': 91.634508}
I1118 07:26:44.871305 139963829905152 keras_utils.py:93] BenchmarkMetric: {'epoch':0, 'time_taken': 91.634508}
Traceback (most recent call last):
File "official/transformer/v2/transformer_main.py", line 474, in
Note:PARAM_SET is base
Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce
It should be one of self.batch_size * self.log_steps is None. Do you set batch_size and log_steps flags correctly?
batch_size is 1024 and log_steps I left it to default
Both FLAGS.batch_size and FLAGS.log_steps cannot be None. Please checkout the master branch or recent releases.