facebookresearch / swav

PyTorch implementation of SwAV https//arxiv.org/abs/2006.09882
Other
1.99k stars 280 forks source link

question in running eval_linear.py #70

Open libingDY opened 3 years ago

libingDY commented 3 years ago

I run in eval_linear.py have a error. how to slove the error?

mathildecaron31 commented 3 years ago

Hi @18456432930

The error happens because the eval_linear.py is trying to logging into a previous logging file which I assume was the logging file from the pretraining. Can you try relaunching by removing the logging files (*.pkl) from the repo where the code writes the log?

libingDY commented 3 years ago

Which part should I modify? Can you say it in more detail

mathildecaron31 commented 3 years ago

you can relaunch the eval_linear.py by specifying a different experiment logging path: mkdir -p $HOME/experiment_linear_eval

python -m torch.distributed.launch --nproc_per_node=8 eval_linear.py \
--dump_path $HOME/experiment_linear_eval \
--data_path /path/to/imagenet \
--pretrained /path/to/checkpoints/swav_800ep_pretrain.pth.tar
libingDY commented 3 years ago

thank you,But I have the following problems File "eval_linear.py", line 219, in main training_stats.update(scores + scores_val) File "/home/libing/1/SWAV/swav-master/src/logger.py", line 91, in update self.stats.loc[len(self.stats.index)] = row File "/home/libing/anaconda3/envs/simsiam/lib/python3.8/site-packages/pandas/core/indexing.py", line 692, in setitem iloc._setitem_with_indexer(indexer, value, self.name) File "/home/libing/anaconda3/envs/simsiam/lib/python3.8/site-packages/pandas/core/indexing.py", line 1629, in _setitem_with_indexer self._setitem_with_indexer_missing(indexer, value) File "/home/libing/anaconda3/envs/simsiam/lib/python3.8/site-packages/pandas/core/indexing.py", line 1918, in _setitem_with_indexer_missing raise ValueError("cannot set a row with mismatched columns") ValueError: cannot set a row with mismatched columns