Open Fululu627 opened 2 years ago
Thanks for your interest! But we have never encountered such problems. Maybe you could check the completeness your dataset and environments.
感谢您的出色工作。我在训练过程中遇到了以下问题。我检查了 PNG 图像,它是正常的,但我在训练期间报告了以下错误 “broken PNG file”。期待您的回复
回溯(最近一次调用最后):文件 “main.py”,第 474 行,在 main() 文件中 文件“main.py”,第 447 行,在 main iterate(“train”, args, train_loader, model, optimizer, logger, epoch) # 训练一个 epoch 文件 “main.py”,第 191 行,迭代 i 中,batch_data 在 enumerate(loader) 中):文件 “/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py”, 第 663 行,下一个 data = self._next_data() 文件“/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py”,第 1356 行,_next_data返回 self._process_data(data) 文件“/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py”,第 1382 行,_process_data data.reraise() 中文件“/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_utils.py”,第 475 行,在 reraise 中引发异常 SyntaxError:在 DataLoader 工作进程 0 中捕获 SyntaxError。原始回溯(最近调用最后一次):文件“/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py”,第 302 行,_worker_loop data = fetcher.fetch(index)文件“/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py”,第 49 行,在 fetch data = [self.dataset[idx] for idx in possibly_batched_index] 中]文件“/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py”,第 49 行,在 data = [self.dataset[idx] 中,对于 possibly_batched_index 中的 idx]文件“/home/hwp/PENet/dataloaders/kitti_loader.py”,第 359 行,在 getitem rgb 中,稀疏,目标 = self。getraw(index) 文件 “/home/hwp/PENet/dataloaders/kitti_loader.py”,第 351 行,在 getraw 中 (self.paths['rgb'][index] 不是 None 和 (self.args.use_rgb or self.args.use_g)) else None 文件 “/home/hwp/PENet/dataloaders/kitti_loader.py”,第 158 行,rgb_read rgb_png = np.array(img_file, dtype='uint8') # 在 [0,255] 范围内文件 “/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/PIL/Image.py”,第 675 行,数组 new[“data”] = self.tobytes() 文件 “/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/PIL/Image.py”,第 718 行,以 TB 为单位 self.load() 文件 “/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/PIL/ImageFile.py”,第 235 行,加载 s = read(self.decodermaxblock)文件 “/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/PIL/PngImagePlugin.py”,第 896 行,load_read cid, pos,长度 = self.png.read() 文件 “/home/hwp/anaconda3/envs/pytorch/lib/python3.7/site-packages/PIL/PngImagePlugin.py”,第 166 行,读取中 raise SyntaxError(f“损坏的 PNG 文件(块 {repr(cid)})”)文件“”,无行 SyntaxError:损坏的 PNG 文件(块 b'\x00\x00\x00\x00\x00')
感谢您的出色工作。您好,请问您这个问题是怎么解决的,能告知一下嘛,我修改了batchsize,修改为1时训练了5轮之后也是这个样子,修改为4时训练一轮都完成不了。期待您的回复。
Thank you for your excellent work. I encountered the following problems during training. I checked the PNG image and it was normal, but I reported the following error "broken PNG file" during training. Look forward to your reply