model: a FewShotREModel instance model_name: Name of the model B: Batch size N: Num of classes for each batch K: Num of instances for each class in the support set Q: Num of instances for each class in the query set ckpt_dir: Directory of chec
(self,
model,
model_name,
B, N_for_train, N_for_eval, K, Q,
na_rate=0,
learning_rate=1e-1,
lr_step_size=20000,
weight_decay=1e-5,
train_iter=30000,
val_iter=1000,
val_step=2000,
test_iter=3000,
load_ckpt=None,
save_ckpt=None,
pytorch_optim=optim.SGD,
bert_optim=False,
warmup=True,
warmup_step=300,
grad_iter=1,
fp16=False,
pair=False,
adv_dis_lr=1e-1,
adv_enc_lr=1e-1)