Tensorflowtts: tensorflow.python.framework.errors_impl.InvalidArgumentError: Trying to access element 62 in a list with 62 elements.

Created on 16 Oct 2020  路  6Comments  路  Source: TensorSpeech/TensorFlowTTS

What this error comes from?

tensorflow.python.framework.errors_impl.InvalidArgumentError: Trying to access element 62 in a list with 62 elements.

access 62 with list elements only 62?

train]:   0%|                                                                                                                                             | 0/200000 [00:00<?, ?it/s]2020-10-16 22:28:20.499294: W tensorflow/core/grappler/optimizers/loop_optimizer.cc:906] Skipping loop optimization for Merge node with control input: cond/branch_executed/_8
Traceback (most recent call last):
  File "examples/tacotron2/train_tacotron2.py", line 488, in <module>
    main()
  File "examples/tacotron2/train_tacotron2.py", line 476, in main
    trainer.fit(
  File "/media/jintian/samsung/source/ai/swarm/exp/TensorFlowTTS/tensorflow_tts/trainers/base_trainer.py", line 870, in fit
    self.run()
  File "/media/jintian/samsung/source/ai/swarm/exp/TensorFlowTTS/tensorflow_tts/trainers/base_trainer.py", line 101, in run
    self._train_epoch()
  File "/media/jintian/samsung/source/ai/swarm/exp/TensorFlowTTS/tensorflow_tts/trainers/base_trainer.py", line 123, in _train_epoch
    self._train_step(batch)
  File "examples/tacotron2/train_tacotron2.py", line 109, in _train_step
    self.one_step_forward(batch)
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 780, in __call__
    result = self._call(*args, **kwds)
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/def_function.py", line 840, in _call
    return self._stateless_fn(*args, **kwds)
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 2829, in __call__
    return graph_function._filtered_call(args, kwargs)  # pylint: disable=protected-access
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1843, in _filtered_call
    return self._call_flat(
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 1923, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/function.py", line 545, in call
    outputs = execute.execute(
  File "/home/jintian/anaconda3/lib/python3.8/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InvalidArgumentError:    Trying to access element 62 in a list with 62 elements.
     [[{{node while_19/body/_1/while/TensorArrayV2Read_1/TensorListGetItem}}]]
     [[tacotron2/encoder/bilstm/forward_lstm/PartitionedCall]] [Op:__inference__one_step_forward_23575]

Function call stack:
_one_step_forward -> _one_step_forward -> _one_step_forward

bug 馃悰

All 6 comments

@jinfagang what is ur tf_addons and tf version ?

@dathudeptrai I am simply using latest version.

@dathudeptrai My bad, previously issue is I am wrongly using config, when switch to baker's config, I got this error.

I don't know how to do now. Please help me

@dathudeptrai My bad, previously issue is I am wrongly using config, when switch to baker's config, I got this error.

I don't know how to do now. Please help me

let me try to re-train tacotron2 based on baker config with the master code, i will reply you tmr :D.

@dathudeptrai Oh! So many thanks! I finally fixed it, it was because a stupid mistake..
I didn't install cudnn for tensorflow.

TensorFlow's error traceback so misleading... thanks for your help!

@dathudeptrai Oh! So many thanks! I finally fixed it, it was because a stupid mistake..
I didn't install cudnn for tensorflow.

TensorFlow's error traceback so misleading... thanks for your help!

when i test 10 sentences in baker, it's worker. But i test all the baker data (10000 sentences),i got error like fllowing:

Traceback (most recent call last):
File "examples/tacotron2/train_tacotron2.py", line 486, in
main()
File "examples/tacotron2/train_tacotron2.py", line 478, in main
resume=args.resume,
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow_tts/trainers/base_trainer.py", line 852, in fit
self.run()
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow_tts/trainers/base_trainer.py", line 101, in run
self._train_epoch()
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow_tts/trainers/base_trainer.py", line 123, in _train_epoch
self._train_step(batch)
File "examples/tacotron2/train_tacotron2.py", line 109, in _train_step
self.one_step_forward(batch)
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 780, in __call__
result = self._call(args, *kwds)
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 840, in _call
return self._stateless_fn(args, *kwds)
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2829, in __call__
return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1848, in _filtered_call
cancellation_manager=cancellation_manager)
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1924, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 550, in call
ctx=ctx)
File "/home/zmk_test/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Trying to access element 77 in a list with 77 elements.
[[{{node while_19/body/_1/while/TensorArrayV2Read_1/TensorListGetItem}}]]
[[tacotron2/encoder/bilstm/backward_lstm/PartitionedCall]] [Op:__inference__one_step_forward_23587]

Function call stack:
_one_step_forward -> _one_step_forward -> _one_step_forward

@jinfagang do you hava any suggestions

Was this page helpful?
0 / 5 - 0 ratings