-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decompressed Data Too Large #22
Comments
Do you use customized data? The code should work fine with the ImageNet dataset. Maybe try to make each of your own data smaller? |
我也遇到了类似的问题。我用的是自定义的数据集,但是还是把它放在imagenet的train下面,请问可以帮我看看吗: In June:
|
您好,您的这个问题是由于torch-fidelity可能处理不了自定义数据,可能在这里要将torch_fidelity.calculate_metrics换成你自己数据上的metric |
那你把这个input2设置成/home/user/sdb2/rcg-main/data/imagenet/val/building就行,他这里的input2需要是一个里面全是图片的文件夹。另一个需要注意的是,如果要evaluate你自己数据集上的FID,请不要使用修改过的torch fidelity,而是直接安装原版pip install torch-fidelity |
谢谢大哥,祝你科研顺利 |
|
所有图片混在一起的 |
Hi Tianhong. There are always errors when training
main_rdm.py
regardless of the value setting of batch size, e.g. , from 32 to 512.What' s the problem and how to solve it?
the following is collapse information:
File "main_rdm.py", line 186, in main
train_stats = train_one_epoch(
File "/home/fengjiw/project/rcg/engine_rdm.py", line 29, in train_one_epoch
for data_iter_step, (samples, class_label) in enumerate(metric_logger.log_every(data_loader, print_freq, header)):
File "/home/fengjiw/project/rcg/util/misc.py", line 134, in log_every
for obj in iterable:
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1224, in _next_data
return self._process_data(data)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1250, in _process_data
data.reraise()
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/_utils.py", line 457, in reraise
raise exception
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
data = fetcher.fetch(index)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 230, in getitem
sample = self.loader(path)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 269, in default_loader
return pil_loader(path)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/torchvision/datasets/folder.py", line 248, in pil_loader
img = Image.open(f)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/Image.py", line 3172, in open
im = _open_core(fp, filename, prefix, formats)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/Image.py", line 3158, in _open_core
im = factory(fp, filename)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/ImageFile.py", line 116, in init
self._open()
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/PngImagePlugin.py", line 734, in open
s = self.png.call(cid, pos, length)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/PngImagePlugin.py", line 202, in call
return getattr(self, "chunk" + cid.decode("ascii"))(pos, length)
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/PngImagePlugin.py", line 412, in chunk_iCCP
icc_profile = _safe_zlib_decompress(s[i + 2 :])
File "/home/fengjiw/miniconda3/envs/rcg/lib/python3.8/site-packages/PIL/PngImagePlugin.py", line 148, in _safe_zlib_decompress
raise ValueError("Decompressed Data Too Large")
The text was updated successfully, but these errors were encountered: