@@ -63,13 +63,18 @@ get_epochs() {
6363# - NUM_FRAMES: number of frames (optional, not passed if unset)
6464# - DATASETS: dataset array (optional, uses DEFAULT_DATASETS if unset/empty)
6565# - REPORT_DIR_SUFFIX: report directory suffix (optional, e.g. "_16frames")
66+ # - K_KEEP: number of top-K patches to keep as visible (default 2048)
6667# ============================================================================
6768run_attentive_probe_codec () {
6869 # Set default values
6970 MODEL_WEIGHT=" ${MODEL_WEIGHT:- NULL} "
7071 FRAMES_TOKEN_NUM=" ${FRAMES_TOKEN_NUM:- 196} "
7172 EMBEDDING_SIZE=" ${EMBEDDING_SIZE:- 768} "
7273 REPORT_DIR_SUFFIX=" ${REPORT_DIR_SUFFIX:- } "
74+ K_KEEP=" ${K_KEEP:- } "
75+ CACHE_DIR=" ${CACHE_DIR:- } "
76+ STATIC_FRAME=" ${STATIC_FRAME:- 4} "
77+ FALLBACK=" ${FALLBACK:- 1} "
7378
7479 # Use custom datasets or default datasets
7580 if [[ -z " ${DATASETS+x} " ]] || [[ ${# DATASETS[@]} -eq 0 ]]; then
@@ -83,7 +88,8 @@ run_attentive_probe_codec() {
8388 for DATASET in " ${DATASETS[@]} " ; do
8489 BATCH_SIZE=$( get_batch_size " $DATASET " )
8590 EPOCHS=$( get_epochs " $DATASET " )
86-
91+ # Get codec-specific parameters for this dataset
92+ get_codec_params " $DATASET "
8793 echo " DATASET=$DATASET , BATCH_SIZE=$BATCH_SIZE "
8894
8995 echo " ========================================================"
@@ -106,12 +112,12 @@ run_attentive_probe_codec() {
106112 EXTRA_ARGS=" ${EXTRA_ARGS} --num_frames ${NUM_FRAMES} "
107113 fi
108114
109- # Add --mv_use_inconsistency for all datasets except diving48
110- if [[ " $DATASET " != " diving48" ]]; then
115+ # Add --mv_use_inconsistency for all datasets except diving48 k400
116+ if [[ " $DATASET " != " diving48" || " $dataset " == " perception_test " || " $dataset " == " k400 " || " $dataset " == " charadesego " ]]; then
111117 EXTRA_ARGS=" ${EXTRA_ARGS} --mv_use_inconsistency"
112118 fi
113119
114- torchrun --nproc_per_node 8 --master_port 15555 \
120+ torchrun --nproc_per_node 8 --master_port 15557 \
115121 attentive_probe_codec.py \
116122 --eval_freq 1 \
117123 --default_lr_list 0.0001 \
@@ -126,6 +132,10 @@ run_attentive_probe_codec() {
126132 --save_report " ${SAVE_DIR} " \
127133 --frames_token_num ${FRAMES_TOKEN_NUM} \
128134 --embedding_size ${EMBEDDING_SIZE} \
135+ --K_keep ${K_KEEP} \
136+ --cache_dir ${CACHE_DIR} \
137+ --static_uniform_frames ${STATIC_FRAME} \
138+ --static_fallback ${FALLBACK} \
129139 ${EXTRA_ARGS}
130140
131141 echo " Finished testing ${DATASET} "
0 commit comments