***************
** Arguments **
***************
backbone: 
config_file: configs/trainers/CoOp/vit_b16_ep50_bs4.yaml
dataset_config_file: configs/datasets/stanford_cars.yaml
eval_only: True
head: 
load_epoch: None
model_dir: 
no_train: False
opts: ['DATASET.SUBSAMPLE_CLASSES', 'new3']
output_dir: output/new3/ZeroshotCLIP/vit_b16_ep50_bs4/stanford_cars/2
resume: 
root: /mnt/hdd/DATA
seed: 2
source_domains: None
target_domains: None
trainer: ZeroshotCLIP
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: StanfordCars
  NUM_LABELED: -1
  NUM_SHOTS: -1
  ROOT: /mnt/hdd/DATA
  SOURCE_DOMAINS: ()
  STL10_FOLD: -1
  SUBSAMPLE_CLASSES: new3
  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.002
  LR_SCHEDULER: cosine
  MAX_EPOCH: 50
  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/new3/ZeroshotCLIP/vit_b16_ep50_bs4/stanford_cars/2
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: 4
    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: ZeroshotCLIP
  ProDA:
    N_CTX: 16
    N_PROMPT: 32
    PREC: fp16
  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: 2.2.1+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Debian GNU/Linux 12 (bookworm) (x86_64)
GCC version: (Debian 12.2.0-14) 12.2.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.36

Python version: 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (64-bit runtime)
Python platform: Linux-6.5.13-3-pve-x86_64-with-glibc2.36
Is CUDA available: True
CUDA runtime version: 11.8.89
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA A800 80GB PCIe
GPU 1: NVIDIA A800 80GB PCIe

Nvidia driver version: 525.147.05
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      46 bits physical, 57 bits virtual
Byte Order:                         Little Endian
CPU(s):                             64
On-line CPU(s) list:                18,20,22,23,25-27,29,31,32,34,37,46-49
Off-line CPU(s) list:               0-17,19,21,24,28,30,33,35,36,38-45,50-63
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Gold 6326 CPU @ 2.90GHz
CPU family:                         6
Model:                              106
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          2
Stepping:                           6
CPU(s) scaling MHz:                 97%
CPU max MHz:                        3500.0000
CPU min MHz:                        800.0000
BogoMIPS:                           5800.00
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect wbnoinvd dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
Virtualization:                     VT-x
L1d cache:                          1.5 MiB (32 instances)
L1i cache:                          1 MiB (32 instances)
L2 cache:                           40 MiB (32 instances)
L3 cache:                           48 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-15,32-47
NUMA node1 CPU(s):                  16-31,48-63
Vulnerability Gather data sampling: Vulnerable: No microcode
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Enhanced / Automatic IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] flake8==3.7.9
[pip3] flake8==3.7.9
[pip3] numpy==1.26.4
[pip3] torch==2.2.1
[pip3] torchaudio==2.2.1
[pip3] torchvision==0.17.1
[pip3] triton==2.2.0
[conda] Could not collect
        Pillow (10.2.0)

Loading trainer: ZeroshotCLIP
Loading dataset: StanfordCars
Reading split from /mnt/hdd/DATA/stanford_cars/split_zhou_StanfordCars.json
Loading preprocessed few-shot data from /mnt/hdd/DATA/stanford_cars/split_fewshot/shot_-1_shuffled-seed_2.pkl
SUBSAMPLE NEW3 CLASSES!
Building transform_train
+ random resized crop (size=(224, 224), scale=(0.08, 1.0))
+ random flip
+ to torch tensor of range [0, 1]
+ normalization (mean=[0.48145466, 0.4578275, 0.40821073], std=[0.26862954, 0.26130258, 0.27577711])
Building transform_test
+ resize the smaller edge to 224
+ 224x224 center crop
+ to torch tensor of range [0, 1]
+ normalization (mean=[0.48145466, 0.4578275, 0.40821073], std=[0.26862954, 0.26130258, 0.27577711])
---------  ------------
Dataset    StanfordCars
# classes  157
# train_x  5,196
# val      1,306
# test     6,417
---------  ------------
Loading CLIP (backbone: ViT-B/16)
Prompts: ['a photo of a 2012 Audi S5 Convertible.', 'a photo of a 2012 Chrysler Town and Country Minivan.', 'a photo of a 2009 Dodge Charger SRT-8.', 'a photo of a 2012 Mitsubishi Lancer Sedan.', 'a photo of a 2012 Buick Verano Sedan.', 'a photo of a 2010 Chrysler Sebring Convertible.', 'a photo of a 2012 BMW ActiveHybrid 5 Sedan.', 'a photo of a 2012 McLaren MP4-12C Coupe.', 'a photo of a 2007 BMW 6 Series Convertible.', 'a photo of a 2008 Chrysler PT Cruiser Convertible.', 'a photo of a 2007 Suzuki Aerio Sedan.', 'a photo of a 2008 Lamborghini Reventon Coupe.', 'a photo of a 2010 BMW M6 Convertible.', 'a photo of a 2012 Ford F-450 Super Duty Crew Cab.', 'a photo of a 1993 Geo Metro Convertible.', 'a photo of a 2012 Infiniti G Coupe IPL.', 'a photo of a 2008 Acura TL Type-S.', 'a photo of a 2012 Cadillac CTS-V Sedan.', 'a photo of a 2012 Rolls-Royce Ghost Sedan.', 'a photo of a 2012 BMW X3 SUV.', 'a photo of a 2009 HUMMER H2 SUT Crew Cab.', 'a photo of a 2012 GMC Canyon Extended Cab.', 'a photo of a 2012 BMW 1 Series Coupe.', 'a photo of a 2012 Audi A5 Coupe.', 'a photo of a 2012 Cadillac SRX SUV.', 'a photo of a 2012 BMW X6 SUV.', 'a photo of a 2012 Chevrolet Silverado 1500 Hybrid Crew Cab.', 'a photo of a 2012 Buick Enclave SUV.', 'a photo of a 2012 Chevrolet Corvette ZR1.', 'a photo of a 2012 Chevrolet Silverado 1500 Regular Cab.', 'a photo of a 2012 smart fortwo Convertible.', 'a photo of a 2011 Audi S6 Sedan.', 'a photo of a 2007 Chevrolet Silverado 1500 Classic Extended Cab.', 'a photo of a 2012 Hyundai Genesis Sedan.', 'a photo of a 2012 Ram C/V Cargo Van Minivan.', 'a photo of a 2011 Audi TT Hatchback.', 'a photo of a 2011 Mazda Tribute SUV.', 'a photo of a 2012 Scion xD Hatchback.', 'a photo of a 2012 MINI Cooper Roadster Convertible.', 'a photo of a 2009 Mercedes-Benz SL-Class Coupe.', 'a photo of a 2012 Ford E-Series Wagon Van.', 'a photo of a 1994 Audi V8 Sedan.', 'a photo of a 2007 Chevrolet Corvette Ron Fellows Edition Z06.', 'a photo of a 2012 BMW Z4 Convertible.', 'a photo of a 2012 Nissan Leaf Hatchback.', 'a photo of a 2000 AM General Hummer SUV.', 'a photo of a 2012 Land Rover LR2 SUV.', 'a photo of a 2012 BMW M3 Coupe.', 'a photo of a 2008 Audi RS 4 Convertible.', 'a photo of a 2007 Buick Rainier SUV.', 'a photo of a 2012 Aston Martin Virage Coupe.', 'a photo of a 2012 Aston Martin V8 Vantage Coupe.', 'a photo of a 1994 Audi 100 Sedan.', 'a photo of a 2007 Volvo XC90 SUV.', 'a photo of a 2012 Chevrolet Traverse SUV.', 'a photo of a 2008 Dodge Magnum Wagon.', 'a photo of a 2012 Acura TL Sedan.', 'a photo of a 2012 Mercedes-Benz S-Class Sedan.', 'a photo of a 2012 Volkswagen Golf Hatchback.', 'a photo of a 2009 Chevrolet TrailBlazer SS.', 'a photo of a 2001 Acura Integra Type R.', 'a photo of a 2010 Dodge Ram Pickup 3500 Crew Cab.', 'a photo of a 2009 Dodge Ram Pickup 3500 Quad Cab.', 'a photo of a 2007 Honda Odyssey Minivan.', 'a photo of a 2012 Audi S4 Sedan.', 'a photo of a 2012 Ford Edge SUV.', 'a photo of a 2012 Hyundai Veloster Hatchback.', 'a photo of a 2007 Chevrolet Express Van.', 'a photo of a 2012 Acura TSX Sedan.', 'a photo of a 2012 Toyota Sequoia SUV.', 'a photo of a 2012 Dodge Caliber Wagon.', 'a photo of a 2007 Dodge Durango SUV.', 'a photo of a 2007 BMW X5 SUV.', 'a photo of a 2012 Dodge Journey SUV.', 'a photo of a 1994 Audi 100 Wagon.', 'a photo of a 2012 Ferrari California Convertible.', 'a photo of a 2012 FIAT 500 Convertible.', 'a photo of a 2012 BMW 3 Series Wagon.', 'a photo of a 2012 Mercedes-Benz Sprinter Van.', 'a photo of a 2009 Spyker C8 Coupe.', 'a photo of a 2012 Maybach Landaulet Convertible.', 'a photo of a 2012 Chevrolet Silverado 1500 Extended Cab.', 'a photo of a 2012 Nissan Juke Hatchback.', 'a photo of a 2012 Audi TTS Coupe.', 'a photo of a 2012 Audi TT RS Coupe.', 'a photo of a 2012 Acura RL Sedan.', 'a photo of a 2012 Volkswagen Beetle Hatchback.', 'a photo of a 1998 Nissan 240SX Coupe.', 'a photo of a 2008 Chrysler Crossfire Convertible.', 'a photo of a 2009 Dodge Sprinter Cargo Van.', 'a photo of a 2012 Jeep Grand Cherokee SUV.', 'a photo of a 2010 Chevrolet Cobalt SS.', 'a photo of a 2012 GMC Acadia SUV.', 'a photo of a 2012 BMW 1 Series Convertible.', 'a photo of a 2012 Suzuki SX4 Hatchback.', 'a photo of a 2007 Ford Freestar Minivan.', 'a photo of a 2007 Cadillac Escalade EXT Crew Cab.', 'a photo of a 2009 Chrysler Aspen SUV.', 'a photo of a 2006 Ford GT Coupe.', 'a photo of a 2012 Tesla Model S Sedan.', 'a photo of a 2012 Ferrari 458 Italia Coupe.', 'a photo of a 2010 Chevrolet Malibu Hybrid Sedan.', 'a photo of a 2010 HUMMER H3T Crew Cab.', 'a photo of a 2012 Toyota Corolla Sedan.', 'a photo of a 2012 Lamborghini Gallardo LP 570-4 Superleggera.', 'a photo of a 2012 Hyundai Elantra Touring Hatchback.', 'a photo of a 2012 Bentley Continental Supersports Conv. Convertible.', 'a photo of a 2009 Bentley Arnage Sedan.', 'a photo of a 2012 Chevrolet Tahoe Hybrid SUV.', 'a photo of a 2012 FIAT 500 Abarth.', 'a photo of a 2012 Land Rover Range Rover SUV.', 'a photo of a 1991 Volkswagen Golf Hatchback.', 'a photo of a 2012 Ford F-150 Regular Cab.', 'a photo of a 1993 Volvo 240 Sedan.', 'a photo of a 2012 Jeep Wrangler SUV.', 'a photo of a 2012 Hyundai Veracruz SUV.', 'a photo of a 2012 Fisker Karma Sedan.', 'a photo of a 2012 Suzuki Kizashi Sedan.', 'a photo of a 2012 BMW 3 Series Sedan.', 'a photo of a 1997 Dodge Caravan Minivan.', 'a photo of a 2012 Chevrolet Sonic Sedan.', 'a photo of a 2012 Chevrolet Camaro Convertible.', 'a photo of a 2012 Jeep Patriot SUV.', 'a photo of a 2012 Hyundai Sonata Hybrid Sedan.', 'a photo of a 2012 GMC Terrain SUV.', 'a photo of a 2011 Infiniti QX56 SUV.', 'a photo of a 2007 Chevrolet Malibu Sedan.', 'a photo of a 2010 Dodge Dakota Crew Cab.', 'a photo of a 2012 Hyundai Sonata Sedan.', 'a photo of a 2012 Ford Fiesta Sedan.', 'a photo of a 2008 Isuzu Ascender SUV.', 'a photo of a 2012 Porsche Panamera Sedan.', 'a photo of a 2012 Honda Accord Coupe.', 'a photo of a 2007 Chevrolet Monte Carlo Coupe.', 'a photo of a 2012 Honda Odyssey Minivan.', 'a photo of a 2007 Chevrolet Express Cargo Van.', 'a photo of a 2012 Hyundai Accent Sedan.', 'a photo of a 2012 GMC Savana Van.', 'a photo of a 2012 Ferrari 458 Italia Convertible.', 'a photo of a 2012 Bentley Continental GT Coupe.', 'a photo of a 2012 Jeep Liberty SUV.', 'a photo of a 2012 Lamborghini Aventador Coupe.', 'a photo of a 2007 Dodge Dakota Club Cab.', 'a photo of a 2012 Nissan NV Passenger Van.', 'a photo of a 2009 Spyker C8 Convertible.', 'a photo of a 2007 Ford Mustang Convertible.', 'a photo of a 2007 Ford Focus Sedan.', 'a photo of a 2012 Buick Regal GS.', 'a photo of a 2012 Mercedes-Benz C-Class Sedan.', 'a photo of a 2012 Hyundai Tucson SUV.', 'a photo of a 2012 Volvo C30 Hatchback.', 'a photo of a 2001 Lamborghini Diablo Coupe.', 'a photo of a 2012 Rolls-Royce Phantom Sedan.', 'a photo of a 2010 BMW M5 Sedan.', 'a photo of a 2009 Bugatti Veyron 16.4 Convertible.', 'a photo of a 2007 Dodge Caliber Wagon.', 'a photo of a 1993 Mercedes-Benz 300-Class Convertible.']
Loading evaluator: Classification
Note that load_model() is skipped as no pretrained model is given (ignore this if it's done on purpose)
Evaluate on the *test* set
=> result
* total: 6,417
* correct: 4,462
* accuracy: 69.53%
* error: 30.47%
* macro_f1: 68.04%
