PaddleSlim icon indicating copy to clipboard operation
PaddleSlim copied to clipboard

example/auto_compression/semantic_segmentation运行错误

Open hyaihjq opened this issue 3 years ago • 1 comments

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

hyaihjq avatar Jul 14 '22 08:07 hyaihjq

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

zzjjay avatar Jul 15 '22 03:07 zzjjay