-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathrun_attack_classification.py
21 lines (18 loc) · 1.11 KB
/
run_attack_classification.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os
# for wordLSTM target
# command = 'python attack_classification.py --dataset_path data/yelp ' \
# '--target_model wordLSTM --batch_size 128 ' \
# '--target_model_path /scratch/jindi/adversary/BERT/results/yelp ' \
# '--word_embeddings_path /data/medg/misc/jindi/nlp/embeddings/glove.6B/glove.6B.200d.txt ' \
# '--counter_fitting_embeddings_path /data/medg/misc/jindi/nlp/embeddings/counter-fitted-vectors.txt ' \
# '--counter_fitting_cos_sim_path ./cos_sim_counter_fitting.npy ' \
# '--USE_cache_path /scratch/jindi/tf_cache'
# for BERT target
command = 'python attack_classification.py --dataset_path data/yelp ' \
'--target_model bert ' \
'--target_model_path /scratch/jindi/adversary/BERT/results/yelp ' \
'--max_seq_length 256 --batch_size 32 ' \
'--counter_fitting_embeddings_path /data/medg/misc/jindi/nlp/embeddings/counter-fitted-vectors.txt ' \
'--counter_fitting_cos_sim_path /scratch/jindi/adversary/cos_sim_counter_fitting.npy ' \
'--USE_cache_path /scratch/jindi/tf_cache'
os.system(command)