This Repository consists of all my experiments performed on LayoutLMv3 model.
28
stars
9
forks
source link
Invalid image type. Expected either PIL.Image.Image, numpy.ndarray, torch.Tensor, tf.Tensor or jax.ndarray, but got <class 'list'>. #3
Open
promaprogga opened 7 months ago
I am getting this error in this cell
Map: 0% 0/100 [00:00<?, ? examples/s]
ValueError Traceback (most recent call last) in <cell line: 12>()
10 })
11
---> 12 train_dataset = dataset["train"].map(
13 prepare_examples,
14 batched=True,
9 frames /usr/local/lib/python3.10/dist-packages/transformers/image_utils.py in make_list_of_images(images, expected_ndims) 160 ) 161 return images --> 162 raise ValueError( 163 "Invalid image type. Expected either PIL.Image.Image, numpy.ndarray, torch.Tensor, tf.Tensor or " 164 f"jax.ndarray, but got {type(images)}."
ValueError: Invalid image type. Expected either PIL.Image.Image, numpy.ndarray, torch.Tensor, tf.Tensor or jax.ndarray, but got <class 'list'>.