Traceback (most recent call last):
File "run.py", line 167, in
main(args)
File "run.py", line 149, in main
ac = AutoCompression(
File "/home/hongyang/codebase/paddle_code/PaddleSlim/paddleslim/auto_compression/compressor.py", line 153, in init
self.train_dataloader = wrap_dataloader(train_dataloader,
File "/home/hongyang/codebase/paddle_code/PaddleSlim/paddleslim/auto_compression/utils/dataloader.py", line 37, in wrap_dataloader
data = next(dataloader())
File "run.py", line 114, in gen
imgs = np.array(data[0])
KeyError: 0
It's a problem of the dataset. 'data[0]' is to take out the image data in it, please check whether the type of 'data' in the reader_wrapper is 'list'.
Or try to reinstall paddleseg (Only paddleseg2.5 is suitable)
pip uninstall paddleseg
pip install paddleseg==2.5.0