muzairkhattak / multimodal-prompt-learning

[CVPR 2023] Official repository of paper titled "MaPLe: Multi-modal Prompt Learning".
https://muzairkhattak.github.io/multimodal-prompt-learning/
MIT License
657 stars 51 forks source link

can't reproduce the results of log files #17

Closed Yi-Qi638 closed 1 year ago

Yi-Qi638 commented 1 year ago

When I run: bash scripts/maple/base2new_est_maple.sh fgvc_aircraft 2

I get: base: 36.9 new: 36.7 I didn't change any code in this file why?

the log_info training is following and test is on the second


Arguments


backbone: config_file: configs/trainers/MaPLe/vit_b16_c2_ep5_batch4_2ctx.yaml dataset_config_file: configs/datasets/fgvc_aircraft.yaml eval_only: False head: load_epoch: None model_dir: no_train: False opts: ['DATASET.NUM_SHOTS', '16', 'DATASET.SUBSAMPLE_CLASSES', 'base'] output_dir: output/base2new/train_base/fgvc_aircraft/shots_16/MaPLe/vit_b16_c2_ep5_batch4_2ctx/seed2 resume: root: ./data seed: 2 source_domains: None target_domains: None trainer: MaPLe transforms: None


Config


DATALOADER: K_TRANSFORMS: 1 NUM_WORKERS: 8 RETURN_IMG0: False TEST: BATCH_SIZE: 100 SAMPLER: SequentialSampler TRAIN_U: BATCH_SIZE: 32 N_DOMAIN: 0 N_INS: 16 SAME_AS_X: True SAMPLER: RandomSampler TRAIN_X: BATCH_SIZE: 4 N_DOMAIN: 0 N_INS: 16 SAMPLER: RandomSampler DATASET: ALL_AS_UNLABELED: False CIFAR_C_LEVEL: 1 CIFAR_C_TYPE: NAME: FGVCAircraft NUM_LABELED: -1 NUM_SHOTS: 16 ROOT: ./data SOURCE_DOMAINS: () STL10_FOLD: -1 SUBSAMPLE_CLASSES: base TARGET_DOMAINS: () VAL_PERCENT: 0.1 INPUT: COLORJITTER_B: 0.4 COLORJITTER_C: 0.4 COLORJITTER_H: 0.1 COLORJITTER_S: 0.4 CROP_PADDING: 4 CUTOUT_LEN: 16 CUTOUT_N: 1 GB_K: 21 GB_P: 0.5 GN_MEAN: 0.0 GN_STD: 0.15 INTERPOLATION: bicubic NO_TRANSFORM: False PIXEL_MEAN: [0.48145466, 0.4578275, 0.40821073] PIXEL_STD: [0.26862954, 0.26130258, 0.27577711] RANDAUGMENT_M: 10 RANDAUGMENT_N: 2 RGS_P: 0.2 RRCROP_SCALE: (0.08, 1.0) SIZE: (224, 224) TRANSFORMS: ('random_resized_crop', 'random_flip', 'normalize') MODEL: BACKBONE: NAME: ViT-B/16 PRETRAINED: True HEAD: ACTIVATION: relu BN: True DROPOUT: 0.0 HIDDEN_LAYERS: () NAME: INIT_WEIGHTS: OPTIM: ADAM_BETA1: 0.9 ADAM_BETA2: 0.999 BASE_LR_MULT: 0.1 GAMMA: 0.1 LR: 0.0035 LR_SCHEDULER: cosine MAX_EPOCH: 5 MOMENTUM: 0.9 NAME: sgd NEW_LAYERS: () RMSPROP_ALPHA: 0.99 SGD_DAMPNING: 0 SGD_NESTEROV: False STAGED_LR: False STEPSIZE: (-1,) WARMUP_CONS_LR: 1e-05 WARMUP_EPOCH: 1 WARMUP_MIN_LR: 1e-05 WARMUP_RECOUNT: True WARMUP_TYPE: constant WEIGHT_DECAY: 0.0005 OUTPUT_DIR: output/base2new/train_base/fgvc_aircraft/shots_16/MaPLe/vit_b16_c2_ep5_batch4_2ctx/seed2 RESUME: SEED: 2 TEST: COMPUTE_CMAT: False EVALUATOR: Classification FINAL_MODEL: last_step NO_TEST: False PER_CLASS_RESULT: False SPLIT: test TRAIN: CHECKPOINT_FREQ: 0 COUNT_ITER: train_x PRINT_FREQ: 20 TRAINER: CDAC: CLASS_LR_MULTI: 10 P_THRESH: 0.95 RAMPUP_COEF: 30 RAMPUP_ITRS: 1000 STRONG_TRANSFORMS: () TOPK_MATCH: 5 COCOOP: CTX_INIT: N_CTX: 16 PREC: fp16 COOP: CLASS_TOKEN_POSITION: end CSC: False CTX_INIT: N_CTX: 16 PREC: fp16 CROSSGRAD: ALPHA_D: 0.5 ALPHA_F: 0.5 EPS_D: 1.0 EPS_F: 1.0 DAEL: CONF_THRE: 0.95 STRONG_TRANSFORMS: () WEIGHT_U: 0.5 DAELDG: CONF_THRE: 0.95 STRONG_TRANSFORMS: () WEIGHT_U: 0.5 DDAIG: ALPHA: 0.5 CLAMP: False CLAMP_MAX: 1.0 CLAMP_MIN: -1.0 G_ARCH: LMDA: 0.3 WARMUP: 0 DOMAINMIX: ALPHA: 1.0 BETA: 1.0 TYPE: crossdomain ENTMIN: LMDA: 0.001 FIXMATCH: CONF_THRE: 0.95 STRONG_TRANSFORMS: () WEIGHT_U: 1.0 IVLP: CTX_INIT: a photo of a N_CTX_TEXT: 2 N_CTX_VISION: 2 PREC: fp16 PROMPT_DEPTH_TEXT: 9 PROMPT_DEPTH_VISION: 9 M3SDA: LMDA: 0.5 N_STEP_F: 4 MAPLE: CTX_INIT: a photo of a N_CTX: 2 PREC: fp16 PROMPT_DEPTH: 9 MCD: N_STEP_F: 4 MEANTEACHER: EMA_ALPHA: 0.999 RAMPUP: 5 WEIGHT_U: 1.0 MIXMATCH: MIXUP_BETA: 0.75 RAMPUP: 20000 TEMP: 2.0 WEIGHT_U: 100.0 MME: LMDA: 0.1 NAME: MaPLe SE: CONF_THRE: 0.95 EMA_ALPHA: 0.999 RAMPUP: 300 VPT: CTX_INIT: a photo of a N_CTX_VISION: 2 PREC: fp16 PROMPT_DEPTH_VISION: 1 USE_CUDA: True VERBOSE: True VERSION: 1 Collecting env info ... System info PyTorch version: 1.9.0 Is debug build: False CUDA used to build PyTorch: 11.2 ROCM used to build PyTorch: N/A

OS: CentOS Linux 7 (Core) (x86_64) GCC version: (GCC) 8.4.0 Clang version: Could not collect CMake version: version 3.22.0-rc2 Libc version: glibc-2.17

Python version: 3.8 (64-bit runtime) Python platform: Linux-3.10.0-1160.31.1.el7.x86_64-x86_64-with-glibc2.10 Is CUDA available: True CUDA runtime version: Could not collect GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3090 GPU 1: NVIDIA GeForce RTX 3090 GPU 2: NVIDIA GeForce RTX 3090 GPU 3: NVIDIA GeForce RTX 3090 GPU 4: NVIDIA GeForce RTX 3090 GPU 5: NVIDIA GeForce RTX 3090 GPU 6: NVIDIA GeForce RTX 3090 GPU 7: NVIDIA GeForce RTX 3090

Nvidia driver version: 470.63.01 cuDNN version: Could not collect HIP runtime version: N/A MIOpen runtime version: N/A

Versions of relevant libraries: [pip3] numpy==1.24.2 [pip3] torch==1.9.0 [pip3] torchaudio==0.9.0a0+33b2469 [pip3] torchvision==0.10.0a0 [conda] cudatoolkit 11.4.2 h7a5bcfd_11 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] libblas 3.9.0 12_linux64_mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] libcblas 3.9.0 12_linux64_mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] liblapack 3.9.0 12_linux64_mkl https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] magma 2.5.4 hc72dce7_4 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] mkl 2021.4.0 h06a4308_640 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main [conda] numpy 1.24.2 py38h10c12cc_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] pytorch 1.9.0 cuda112py38h3d13190_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] pytorch-gpu 1.9.0 cuda112py38h0bbbad9_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge [conda] torchaudio 0.9.0 py38 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch [conda] torchvision 0.10.0 py38cuda112h04b465a_0_cuda https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge Pillow (9.4.0)

Loading trainer: MaPLe Loading dataset: FGVCAircraft Loading preprocessed few-shot data from /mnt/cfs/algorithm/yiqi.wang/code/acmmm/multimodal-prompt-learning/data/fgvc_aircraft/split_fewshot/shot_16-seed_2.pkl SUBSAMPLE BASE CLASSES! Building transform_train

Yi-Qi638 commented 1 year ago

The same issue has also been observed in other datasets such as SUN397 seed2 and seed3. It appears that there may be some differences between these datasets and the implementation provided in the published link.

muzairkhattak commented 1 year ago

Hi @Wangyiqi,

Thank you for reaching out. We have verified reproducing the results and we are getting similar results as reported in the main paper.

Regarding your issue, please consider verifying the following,

1) Can you specify the source from where you have downloaded the datasets?, Can you make sure if you have downloaded the datasets by following the instructions provided in DATASETS.md file?

2) Have you installed a fresh new conda environment for this project? It is highly recommended to create a new anaconda environment by following the steps provided in INSTALL.md.

Kindly let us know if that resolves your issue.

Thank you.

muzairkhattak commented 1 year ago

Hi @Wangyiqi,

Feel free to re-open the issue in case there is still any issue.

Thank you!