I ? ?surrender?
2022-05-18 22:22
采纳率: 0%
浏览 73

paddleclas 出现 ValueError: invalid literal for int() with base 10: '3.jpg'问题

学习图像分类和paddle时在飞浆AI Studio中找了个图像分类的项目https://aistudio.baidu.com/aistudio/projectdetail/2219455?channelType=0&channel=0
换成了自己的数据集后训练时出现错误

Traceback (most recent call last):
  File "tools/train.py", line 31, in <module>
    trainer.train()
  File "/home/aistudio/PaddleClas/ppcls/engine/trainer.py", line 141, in train
    self.config["DataLoader"], "Train", self.device, self.use_dali)
  File "/home/aistudio/PaddleClas/ppcls/data/__init__.py", line 72, in build_dataloader
    dataset = eval(dataset_name)(**config_dataset)
  File "/home/aistudio/PaddleClas/ppcls/data/dataloader/common_dataset.py", line 59, in __init__
    self._load_anno()
  File "/home/aistudio/PaddleClas/ppcls/data/dataloader/imagenet_dataset.py", line 37, in _load_anno
    self.labels.append(int(l[1]))
ValueError: invalid literal for int() with base 10: '3.jpg'

求解,谢谢大家。

1条回答 默认 最新

相关推荐 更多相似问题