When I try to load the dataset with:
train_dataset = tfds.load(‘cifar10’, as_supervised=True, split=“train”)
I get the following StackTrace:
ImportError Traceback (most recent call last)
in <cell line: 16>()
14
15 # use tfds.load() to fetch the ‘train’ split of CIFAR-10
—> 16 train_dataset = tfds.load(‘cifar10’, as_supervised=True, split=“train”)
17
18 # preprocess the dataset with the map_image()
function above
14 frames
/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/ops/dataset_ops.py in interleave(self, map_func, cycle_length, block_length, num_parallel_calls, deterministic, name)
2425 state_structure = structure.type_spec_from_value(initial_state)
2426
→ 2427 # Iteratively rerun the reduce function until reaching a fixed point on
2428 # state_structure
.
2429 need_to_rerun = True
ImportError: cannot import name ‘interleave_op’ from ‘tensorflow.python.data.ops’ (/usr/local/lib/python3.10/dist-packages/tensorflow/python/data/ops/init.py)
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
“Open Examples” button below.
But I couldn’t figure out how to install the missing package!