--- license: apache-2.0 --- insert_at_4_nonfrozen_50rn_8heads_k=128.ckpt * Final validation scores: acc@1=0.758 acc@5=0.92 * Trained for 4 epochs ``` # lightning.pytorch==2.0.0 seed_everything: true trainer: callbacks: - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: save_last: true save_top_k: 1 monitor: v_c_loss - class_path: lightning.pytorch.callbacks.LearningRateMonitor accelerator: auto strategy: auto devices: auto num_nodes: 1 precision: 16-mixed logger: null fast_dev_run: false max_epochs: 8 min_epochs: null max_steps: -1 min_steps: null max_time: null limit_train_batches: null limit_val_batches: null limit_test_batches: null limit_predict_batches: null overfit_batches: 0.0 val_check_interval: 0.1 check_val_every_n_epoch: 1 num_sanity_val_steps: null log_every_n_steps: 15 enable_checkpointing: true enable_progress_bar: null enable_model_summary: null accumulate_grad_batches: 1 gradient_clip_val: 1.0 gradient_clip_algorithm: null deterministic: null benchmark: null inference_mode: true use_distributed_sampler: true profiler: null detect_anomaly: false barebones: false plugins: null sync_batchnorm: false reload_dataloaders_every_n_epochs: 0 default_root_dir: ckpt/insert_at_4_nonfrozen_50rn_4heads_k=128 model: resnet_type: 50 is_rq: false quantizer_args: heads: 8 use_cosine_sim: false accept_image_fmap: true codebook_dim: 256 codebook_size: 128 decay: 0.95 eps: 1.0e-05 commitment_weight: 0.0 threshold_ema_dead_code: 2 resnet_insertion_index: 4 unfreeze_resnet_block_indeces: [3] unfreeze_fc: true lr: 0.00010 data: data_dir: "/home/figes/Downloads/ILSVRC2012_CLS-LOC/" image_size: 224 num_workers: 6 batch_size: 512 shuffle: true pin_memory: true drop_last: false ``` epoch0-insert-at-4-frozen-deep-norq.ckpt * trained to vall acc@5 0.887 acc@1 .6697 * big codebook size (256) * 8 heads ``` # lightning.pytorch==2.0.0 # bigger depth seed_everything: true trainer: callbacks: - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: save_last: true save_top_k: 1 monitor: v_c_loss accelerator: auto strategy: auto devices: auto num_nodes: 1 precision: 16-mixed logger: null callbacks: null fast_dev_run: false max_epochs: 5 min_epochs: null max_steps: -1 min_steps: null max_time: null limit_train_batches: null limit_val_batches: null limit_test_batches: null limit_predict_batches: null overfit_batches: 0.0 val_check_interval: 0.1 check_val_every_n_epoch: 1 num_sanity_val_steps: null log_every_n_steps: 15 enable_checkpointing: true enable_progress_bar: null enable_model_summary: null accumulate_grad_batches: 1 gradient_clip_val: 1.0 gradient_clip_algorithm: null deterministic: null benchmark: null inference_mode: true use_distributed_sampler: true profiler: null detect_anomaly: false barebones: false plugins: null sync_batchnorm: false reload_dataloaders_every_n_epochs: 0 default_root_dir: ckpt/insert_at_4_frozen_deep model: resnet_type: 34 is_rq: false quantizer_args: heads: 8 use_cosine_sim: false accept_image_fmap: true codebook_dim: 128 codebook_size: 256 decay: 0.85 eps: 1.0e-05 commitment_weight: 5.0 threshold_ema_dead_code: 1 resnet_insertion_index: 4 unfreeze_resnet_block_indeces: [] unfreeze_fc: false lr: 0.0002 data: data_dir: "/home/figes/Downloads/ILSVRC2012_CLS-LOC/" image_size: 224 num_workers: 6 batch_size: 512 shuffle: true pin_memory: true drop_last: false ``` insert_at_4_nonfrozen_deep_epoch=3-step=7759.ckpt * small codebook size (64) * trained to v acc@5 .8645 acc@1 0.6554 ``` # lightning.pytorch==2.0.0 # bigger depth seed_everything: true trainer: callbacks: - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: save_last: true save_top_k: 1 monitor: v_c_loss accelerator: auto strategy: auto devices: auto num_nodes: 1 precision: 16-mixed logger: null callbacks: null fast_dev_run: false max_epochs: 5 min_epochs: null max_steps: -1 min_steps: null max_time: null limit_train_batches: null limit_val_batches: null limit_test_batches: null limit_predict_batches: null overfit_batches: 0.0 val_check_interval: 0.1 check_val_every_n_epoch: 1 num_sanity_val_steps: null log_every_n_steps: 15 enable_checkpointing: true enable_progress_bar: null enable_model_summary: null accumulate_grad_batches: 1 gradient_clip_val: 1.0 gradient_clip_algorithm: null deterministic: null benchmark: null inference_mode: true use_distributed_sampler: true profiler: null detect_anomaly: false barebones: false plugins: null sync_batchnorm: false reload_dataloaders_every_n_epochs: 0 default_root_dir: ckpt/insert_at_4_nonfrozen_deep model: resnet_type: 34 is_rq: false quantizer_args: heads: 8 use_cosine_sim: false accept_image_fmap: true codebook_dim: 128 codebook_size: 64 decay: 0.85 eps: 1.0e-05 commitment_weight: 0.5 threshold_ema_dead_code: 1 sample_codebook_temp: 0.1 resnet_insertion_index: 4 unfreeze_resnet_block_indeces: - 2 - 3 unfreeze_fc: true lr: 0.0001 data: data_dir: "/home/figes/Downloads/ILSVRC2012_CLS-LOC/" image_size: 224 num_workers: 6 batch_size: 512 shuffle: true pin_memory: true drop_last: false ``` epoch=1-step=4503.ckpt * inserted at 3, all resnet weights frozen * ~.62 val acc ``` # lightning.pytorch==2.0.0 seed_everything: true trainer: callbacks: - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: save_last: true save_top_k: 1 monitor: v_c_loss accelerator: auto strategy: auto devices: auto num_nodes: 1 precision: 16-mixed logger: null callbacks: null fast_dev_run: false max_epochs: 10 min_epochs: null max_steps: -1 min_steps: null max_time: null limit_train_batches: null limit_val_batches: null limit_test_batches: null limit_predict_batches: null overfit_batches: 0.0 val_check_interval: 0.1 check_val_every_n_epoch: 1 num_sanity_val_steps: null log_every_n_steps: 5 enable_checkpointing: true enable_progress_bar: null enable_model_summary: null accumulate_grad_batches: 1 gradient_clip_val: 0.5 gradient_clip_algorithm: null deterministic: null benchmark: null inference_mode: true use_distributed_sampler: true profiler: null detect_anomaly: false barebones: false plugins: null sync_batchnorm: false reload_dataloaders_every_n_epochs: 0 default_root_dir: ckpt/test_insert_at_3_frozen model: resnet_type: 34 is_rq: true quantizer_args: num_quantizers: 4 shared_codebook: false quantize_dropout: true accept_image_fmap: true codebook_dim: 128 codebook_size: 512 decay: 0.85 eps: 1.0e-05 commitment_weight: 25.0 threshold_ema_dead_code: 2 sample_codebook_temp: 0.05 quantize_dropout_cutoff_index: 1 quantize_dropout_multiple_of: 1 resnet_insertion_index: 3 lr: 0.0002 data: data_dir: "/home/figes/Downloads/ILSVRC2012_CLS-LOC/" image_size: 224 num_workers: 8 batch_size: 512 shuffle: true pin_memory: true drop_last: false ``` epoch2-val-63.ckpt * final val acc .63 * trained for 2 epochs * More compressed embedding space, with more dropout * git commit dc54a9bdbfcfbc83c736ac5c06ab09c5acf2d5e8 ``` # lightning.pytorch==2.0.0 seed_everything: true trainer: callbacks: - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: save_last: true save_top_k: 1 monitor: v_c_loss accelerator: auto strategy: auto devices: auto num_nodes: 1 precision: 16-mixed logger: null callbacks: null fast_dev_run: false max_epochs: 10 min_epochs: null max_steps: -1 min_steps: null max_time: null limit_train_batches: null limit_val_batches: null limit_test_batches: null limit_predict_batches: null overfit_batches: 0.0 val_check_interval: 0.1 check_val_every_n_epoch: 1 num_sanity_val_steps: null log_every_n_steps: 5 enable_checkpointing: true enable_progress_bar: null enable_model_summary: null accumulate_grad_batches: 1 gradient_clip_val: 0.5 gradient_clip_algorithm: null deterministic: null benchmark: null inference_mode: true use_distributed_sampler: true profiler: null detect_anomaly: false barebones: false plugins: null sync_batchnorm: false reload_dataloaders_every_n_epochs: 0 default_root_dir: ckpt/insert_at_4 model: resnet_type: 34 is_rq: true quantizer_args: num_quantizers: 8 shared_codebook: true quantize_dropout: false accept_image_fmap: true codebook_dim: 128 codebook_size: 64 decay: 0.8 eps: 1.0e-05 commitment_weight: 5.0 threshold_ema_dead_code: 1 sample_codebook_temp: 0.1 resnet_insertion_index: 4 unfreeze_resnet_block_indeces: - 3 unfreeze_fc: true lr: 0.0002 data: data_dir: "/home/figes/Downloads/ILSVRC2012_CLS-LOC/" image_size: 224 num_workers: 6 batch_size: 512 shuffle: true pin_memory: true drop_last: false ``` ### epoch=5-step=14765.ckpt * trained for 5 1/2 epochs on imagenet, on top of resnet 34 * final validation accuracy: .66 * final training accuracy: 0.64 * git hash: `c4852331f9a40393b8ffd8b7b9a689d1ff6e1021` * config: ``` # lightning.pytorch==2.0.0 seed_everything: true trainer: callbacks: - class_path: lightning.pytorch.callbacks.ModelCheckpoint init_args: save_last: true save_top_k: 1 monitor: v_c_loss accelerator: auto strategy: auto devices: auto num_nodes: 1 precision: 16-mixed logger: null callbacks: null fast_dev_run: false max_epochs: 10 min_epochs: null max_steps: -1 min_steps: null max_time: null limit_train_batches: null limit_val_batches: null limit_test_batches: null limit_predict_batches: null overfit_batches: 0.0 val_check_interval: 0.1 check_val_every_n_epoch: 1 num_sanity_val_steps: null log_every_n_steps: 5 enable_checkpointing: true enable_progress_bar: null enable_model_summary: null accumulate_grad_batches: 1 gradient_clip_val: 0.5 gradient_clip_algorithm: null deterministic: null benchmark: null inference_mode: true use_distributed_sampler: true profiler: null detect_anomaly: false barebones: false plugins: null sync_batchnorm: false reload_dataloaders_every_n_epochs: 0 default_root_dir: ckpt/test_insert_at_4 model: resnet_type: 34 is_rq: true quantizer_args: num_quantizers: 4 shared_codebook: true quantize_dropout: false accept_image_fmap: true codebook_dim: 128 codebook_size: 256 decay: 0.8 eps: 1.0e-05 commitment_weight: 5.0 threshold_ema_dead_code: 1 sample_codebook_temp: 0.0 resnet_insertion_index: 4 unfreeze_resnet_block_indeces: - 3 unfreeze_fc: true lr: 0.0002 data: data_dir: "/home/figes/Downloads/ILSVRC2012_CLS-LOC/" image_size: 224 num_workers: 8 batch_size: 512 shuffle: true pin_memory: true drop_last: false ```