question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
jinfagangcommented, Oct 18, 2020

@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!

1reaction
jinfagangcommented, Oct 17, 2020

@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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incompatible shapes: [1,85,85,9] vs. ...
I have a 4 dimensional x matrix. I want to compare the median element of the elements in the x matrix ...
Read more >
Support sequence length 0 for images with unknown shape
tensorflow.python.framework.errors_impl.InvalidArgumentError: Tried to stack elements of an empty list with non-fully-defined element_shape: ...
Read more >
Python: Print a list of space-separated elements
Python List Exercises, Practice and Solution: Write a Python program to print a list of space-separated elements.
Read more >
tf.data.experimental.get_single_element
Returns the single element of the dataset as a nested structure of tensors. (deprecated)
Read more >
Python Lists
A list is similar to an array that consists of a group of elements or items. Just like an array, a list can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found