google-research / meta-dataset

A dataset of datasets for learning to learn from few examples
Apache License 2.0
761 stars 139 forks source link

Using Dataset raised ValueError in episodic mode #118

Open SevenFo opened 1 year ago

SevenFo commented 1 year ago

Follow notebook “Intro_to_Metadataset.ipynb” to use dataset. Raised ValueError as I iterate over dataset (in Using Dataset section), when only sampled data from ilsvrc_2012 dataset in episodic mode, Detailed error message: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (113,) + inhomogeneous part.

To prove that something wrong with ilsvrc_2012 dataset: modify

ALL_DATASETS = ['aircraft', 'cu_birds', 'dtd', 'fungi', 'ilsvrc_2012',
                'omniglot', 'quickdraw', 'vgg_flower']

to

ALL_DATASETS = ['ilsvrc_2012']

and

use_dag_ontology_list = [True]

when execute

idx, (episode, source_id) = next(iterate_dataset(dataset_episodic, 1))

python raise ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (113,) + inhomogeneous part.

However, once set use_dag_ontology_list to [False], The code works perfectly.

any help would be appreciated!

PastaAddict commented 9 months ago

Any solutions to this problem?