Short description
Trying to download the Celeb-A dataset from using tfds.load; the download works fine, but (at the end of the processing, I guess) raises the error.
Environment information
tensorflow-datasets/tfds-nightly version: tested with tensorflow-datasets==1.0.1 and tfds-nitghlytensorflow/tensorflow-gpu/tf-nightly/tf-nightly-gpu version: tf-nightly-gpu-2.0-preview==2.0.0.dev20190227Reproduction instructions
dataset_name = "celeb_a"
if dataset_name not in tfds.list_builders():
raise ValueError(f"Something wrong with tfds: missing {dataset_name}")
dataset, info = tfds.load(dataset_name)
Expected behavior
It should just work.
Logs
AttributeError Traceback (most recent call last)
<ipython-input-26-7bf7b23740e9> in <module>
6 if dataset_name not in tfds.list_builders():
7 raise ValueError(f"Something wrong with tfds: missing {dataset_name}")
----> 8 dataset, info = tfds.load(dataset_name)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/api_utils.py in disallow_positional_args_dec(fn, instance, args, kwargs)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/registered.py in load(name, split, data_dir, batch_size, download, as_supervised, with_info, builder_kwargs, download_and_prepare_kwargs, as_dataset_kwargs)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/api_utils.py in disallow_positional_args_dec(fn, instance, args, kwargs)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py in download_and_prepare(self, download_dir, download_config)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_info.py in compute_dynamic_properties(self)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_info.py in _compute_dynamic_properties(self, builder)
/data/pgaleone/env/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_info.py in get_dataset_feature_statistics(builder, split)
AttributeError: '_OptionsDataset' object has no attribute 'output_shapes'
pip install tfds-nightly should do the trick.
TF 2.0 is under active development, so 1.0.1 is no longer compatible with the latest TF 2.0 preview.
I've also tested with the nightly: same behaviour
Hmm...this is our latest continuous build and all tests pass against TF 2.0 (logs). Could you ensure you're using the latest tfds-nightly and 2.0 preview? You can look in the logs to see what version of TF 2.0 was tested against.
Update: you're right.
Using a new virtualenv with tensorflow 2.0 nightly and tfds-nighly works; probably I had something old in the env. Thanks!
Great!
import tensorflow_datasets as tfds
AND i solved this error, try it.
ds.output_shapes is deprecated (will be replaced by a new tensor spec system).
In the meantime, you can use tf.compat.v1.data.get_output_shapes(ds)
Most helpful comment
ds.output_shapesis deprecated (will be replaced by a new tensor spec system).In the meantime, you can use
tf.compat.v1.data.get_output_shapes(ds)