I want to build the dataset by reading the path of the jpg image under the folder.But when I use tf.data.Dataset.list_files
, there is a unicode error.
image_dir=os.path.join('/images')
list_ds=tf.data.Dataset.list_files(image_dir+'/*')
the error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd5 in position 40: invalid continuation byte
How should I solve this problem?