Open 7Anonym opened 1 year ago
A similar problem occurs in the ImageNet-R dataset, where I got (with the suggested scripts)
which is also less than the reported values.
Hi, thanks for your comment.
It's my fault for writing the README incorrectly.
In the README batch_size was written as 16, but looking at the script file (tranin_cifar100_dualprompt.sh
and train_imr_dualmprompt.sh
) used for the actual train, it is 24.
Confused with L2P.
README will be modified and, Sorry for the confusion once again.
Experiment with batch_size 24 and feel free to comment if there is anything strange.
Best, Jaeho Lee.
Hi Jaeho,
Thanks for your timely reply. After changing the batch size, I obtain almost the same performance, i.e., final accuracy as 77.22.
In fact, I found a way to reproduce the results by changing the pre-trained model in Line 41 into vit_base_patch16_224_in21k.
In my opinion, the original L2P and DualPrompt are using the imagenet21k pretrained Vit model, since the link in the original repo is also directed to it (see this issue)
By changing the pre-trained model, I obtain the competitive results to the original paper.
Hi, thanks for the comment.
I found that timm's vit_base_patch16_224_in21k and the model used in the official code are different. It uses the augmented version of vit_base_patch16_224_in2lk url.
So I modified the url of vit_base_patch16_224 to be the same as the model used in the official code. Check out my code here.
I still reproduce well. Please let me know if there is anything I missed and provide detailed information such as detailed environment, GPU information, etc.
Let's discuss about this issue together.
Best, Jaeho Lee.
Hi Jaeho,
Thanks for your comment! I noticed your modification in the pretrained model, which is consistent with the original repo.
After the clarification, I am not quite sure about the reason for the performance gap. I will create a same environment to yours for evaluation to check whether the gap is from different torch version, etc.
BTW, could you provide the training log of yours in your environment? I am still curious about the reason for such performance gap. Thanks!
Sorry for the delayed reply. I had busy jobs.
The training log is here. Please check it.
dualprompt_result.txt
This is the result of randomly giving only seed (--seed=$RANDOM)in train_cifar100_dualprompt.sh
I still don't know why the performance degradation is occurring. More information and experiments are needed.
I will create a same environment to yours
Does this mean that the previous experiment was conducted in a different environment than mine?
If so, you also need to consider environmental issues.
Please let me know the results after experimenting in the same environment as me.
Best, Jaeho Lee.
Sorry for the delayed reply. I had busy jobs.
The training log is here. Please check it. dualprompt_result.txt This is the result of randomly giving only seed (--seed=$RANDOM)in
train_cifar100_dualprompt.sh
I still don't know why the performance degradation is occurring. More information and experiments are needed.
I will create a same environment to yours
Does this mean that the previous experiment was conducted in a different environment than mine? If so, you also need to consider environmental issues.Please let me know the results after experimenting in the same environment as me.
Best, Jaeho Lee.
In your log, you use batch_size=24 and e-prompt length=5. i don't this setting matches to the official code?
Thanks for your great job in reproducing these works with Pytorch!
I have a question about the reproduced results. I am running the code with suggested scripts with a single GPU in readme:
python -m torch.distributed.launch \ --nproc_per_node=1 \ --use_env main.py \ cifar100_dualprompt \ --model vit_base_patch16_224 \ --batch-size 16 \ --data-path /local_datasets/ \ --output_dir ./output
this shall undergo the training process of CIFAR100, with a single GPU. The full log is reported here dualprompt.txt The final performance is listed as:
` Averaged stats: Lr: 0.001875 Loss: -0.7786 Acc@1: 93.7500 (93.3000) Acc@5: 100.0000 (99.3200) Test: [Task 1] [ 0/63] eta: 0:00:17 Loss: 0.9931 (0.9931) Acc@1: 75.0000 (75.0000) Acc@5: 93.7500 (93.7500) time: 0.2747 data: 0.1619 max mem: 2112 Test: [Task 1] [30/63] eta: 0:00:03 Loss: 0.6518 (0.5845) Acc@1: 81.2500 (83.6694) Acc@5: 100.0000 (97.5806) time: 0.1127 data: 0.0001 max mem: 2112 Test: [Task 1] [60/63] eta: 0:00:00 Loss: 0.4332 (0.5457) Acc@1: 81.2500 (83.4016) Acc@5: 100.0000 (97.9508) time: 0.1190 data: 0.0001 max mem: 2112 Test: [Task 1] [62/63] eta: 0:00:00 Loss: 0.3826 (0.5352) Acc@1: 87.5000 (83.8000) Acc@5: 100.0000 (98.0000) time: 0.1163 data: 0.0001 max mem: 2112 Test: [Task 1] Total time: 0:00:07 (0.1176 s / it)
It seems the final acc@1 is 77.3 instead of the reported 86.51. Did I miss anything? Thanks!