tensorflow / tensorflow/datasets

Invalid Tensor Index 'ragged_flat_values' when using Sequence as top-level feature

Open
#2,243 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug contributions welcome
Dominant language
Python
Stars
4.6k
Forks
1.6k
Avg merge
3h 54m
Merged PRs (30d)
1

Description

Short description
I'm trying to add a new dataset. Serialization succeeded, but when loading the data, the error below occurs.

TypeError: Only integers, slices (`:`), ellipsis (`...`), tf.newaxis (`None`) and scalar tf.int32/tf.int64 tensors are valid indices, got 'ragged_flat_values'  

Detailed stacktrace below, the error happens in the deserialization.

Environment information

  • Operating System: ubuntu 18.04
  • Python version: 3.6
  • tensorflow-datasets/tfds-nightly version: tfds-nightly
  • tensorflow/tensorflow-gpu/tf-nightly/tf-nightly-gpu version: tested on tensorflow 2.2.0 and 2.3.0

Reproduction instructions

https://github.com/hermannsblum/tf_datasets/blob/3dpw/tensorflow_datasets/human_pose/pose_3dpw.py

Link to logs

stack trace

Expected behavior
The dataset to load, or an error at dataset building.

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction in tensorflow_datasets/human_pose/pose_3dpw.py and review the linked stack trace to trace deserialization of a top-level Sequence feature. Confirm the behavior with TensorFlow 2.2.0 or 2.3.0; done means the dataset loads successfully or rejects the configuration during dataset building.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
data, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.