Closed cxxgtxy closed 4 years ago
Did you use the latest code? If so, could you please provide more detailed logs? Thanks.
Yes, I use the latest code by last night.
File "tools/train.py", line 141, in main
247 meta=meta)
248 File "/home/guest/OpenSelfSup-master/tools/../openselfsup/apis/train.py", line 95, in train_model
249 model, dataset, cfg, logger=logger, timestamp=timestamp, meta=meta)
250 File "/home/guest/OpenSelfSup-master/tools/../openselfsup/apis/train.py", line 219, in _dist_train
251 runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
252 File "/home/guest/mmcv-master/mmcv/runner/epoch_based_runner.py", line 122, in run
253 epoch_runner(data_loaders[i], *kwargs)
254 File "/home/guest/mmcv-master/mmcv/runner/epoch_based_runner.py", line 27, in train
255 for i, data_batch in enumerate(data_loader):
256 File "/home/guest/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
257 return self._process_next_batch(batch)
258 File "/home/guest/.local/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
259 raise batch.exc_type(batch.exc_msg)
260 AttributeError: Traceback (most recent call last):
261 File "/home/guest/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop
262 samples = collate_fn([dataset[i] for i in batch_indices])
263 File "/home/guest/.local/lib/python3.6/site-packages/torch/utils/data/_utils/worker.py", line 99, in
I guess the file train.txt
is not correct. This file should contain filename\n
in each line without the label. Please refer to: https://github.com/open-mmlab/OpenSelfSup/blob/master/docs/INSTALL.md#prepare-imagenet-and-places205
You may also refer to the ready-made lists: https://drive.google.com/drive/folders/1wYkJU_1qRHEt1LPVjBiG6ddUFV-t9hVJ
It works. Thanks!
Thanks for this good work. I set up the envs as requirements. The pillow version is controlled under 6.2. However, it reprort errors when I trains moco on ImageNet. Have you met with such errors?
.local/lib/python3.6/site-packages/torchvision/transforms/transforms.py", line 636, in get_params area = img.size[0] * img.size[1] AttributeError: 'tuple' object has no attribute 'size'