forked from chandlerbing65nm/FakeImageDetection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·26 lines (25 loc) · 857 Bytes
/
test.sh
File metadata and controls
executable file
·26 lines (25 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
# Define the arguments for your test script
GPUs="$1"
NUM_GPU=$(echo $GPUs | awk -F, '{print NF}')
DATA_TYPE="Wang_CVPR20" # Wang_CVPR20 or Ojha_CVPR23
MODEL_NAME="RN50" # # RN50_mod, RN50, clip_vitl14, clip_rn50
MASK_TYPE="nomask" # spectral, pixel, patch or nomask
BAND="all" # all, low, mid, high
RATIO=15
BATCH_SIZE=64
#export CUDA_VISIBLE_DEVICES=$GPUs # Set the CUDA_VISIBLE_DEVICES environment variable to use GPUs
#export TORCH_NCCL_BLOCKING_WAIT=1 # Or 0, depending on your needs
echo "Using $NUM_GPU GPUs with IDs: $GPUs"
# Run the test command
#python -m torch.distributed.launch --nproc_per_node=$NUM_GPU test.py \
python test.py \
--data_type $DATA_TYPE \
--pretrained \
--model_name $MODEL_NAME \
--mask_type $MASK_TYPE \
--band $BAND \
--ratio $RATIO \
--batch_size $BATCH_SIZE \
--clip_ft \
# --other_model