Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
JingqingZ committed Mar 28, 2019
1 parent fd0d8a7 commit c4065cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src_reject/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ def error_seen():
# "" if not config.global_full_test else "_full", epoch)
elif config.dataset == "20news":
filename = "../results/seen_selected_tfidf_news20_vwonly_random%d_unseen%s_max%d_cnn/logs/test_full_%d.npz" \
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 200, 10)
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 200, 5)
# filename = "../results/unseen_selected_tfidf_news20_kg3_cluster_3group_%s_random%d_unseen%s_max%d_cnn_negative%dincrease%d_randomtext_aug%d/logs/test%s_%d.npz" \
# % (config.model, i + 1, "-".join(str(_) for _ in rgroup[1]), 50, config.negative_sample, config.negative_increase, config.augmentation,
# "" if not config.global_full_test else "_full", epoch)
Expand Down Expand Up @@ -1128,13 +1128,13 @@ def error_overall_with_rejector():
elif config.dataset == "20news" and config.unseen_rate == 0.25:
unseen_filename = "../results/unseen_selected_tfidf_news20_kg3_cluster_3group_only_random%d_unseen%s_max%d_cnn_negative%dincrease%d_randomtext/logs/test_full_%d.npz" \
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 50, 1, 1, 1)
seen_filename = "../results/seen_selected_tfidf_news20_vwonly_random%d_unseen%s_max%d_cnn/logs/test_%d.npz" \
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 200, 30)
seen_filename = "../results/seen_selected_tfidf_news20_vwonly_random%d_unseen%s_max%d_cnn/logs/test_full_%d.npz" \
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 200, 5)
elif config.dataset == "20news" and config.unseen_rate == 0.5:
unseen_filename = "../results/unseen_selected_tfidf_news20_kg3_cluster_3group_%s_random%d_unseen%s_max%d_cnn_negative%dincrease%d_randomtext_aug%d/logs/test_full_%d.npz" \
% (config.model, i + 1, "-".join(str(_) for _ in rgroup[1]), 50, config.negative_sample, config.negative_increase, config.augmentation, config.global_test_base_epoch)
seen_filename = "../results/seen_selected_tfidf_news20_vwonly_random%d_unseen%s_max%d_cnn/logs/test_%d.npz" \
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 200, 10)
seen_filename = "../results/seen_selected_tfidf_news20_vwonly_random%d_unseen%s_max%d_cnn/logs/test_full_%d.npz" \
% (i + 1, "-".join(str(_) for _ in rgroup[1]), 200, 5)

else:
raise Exception("exception")
Expand Down
3 changes: 0 additions & 3 deletions src_reject/run.sh

This file was deleted.

4 changes: 2 additions & 2 deletions src_reject/train_seen.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ def run_20news():
base_epoch=-1,
gpu_config=gpu_config
)
ctl.controller(train_text_seqs, train_class_list, test_text_seqs, test_class_list, train_epoch=10)
ctl.controller4test(test_text_seqs, test_class_list, unseen_class_list=ctl.unseen_class, base_epoch=10)
ctl.controller(train_text_seqs, train_class_list, test_text_seqs, test_class_list, train_epoch=5)
ctl.controller4test(test_text_seqs, test_class_list, unseen_class_list=ctl.unseen_class, base_epoch=5)

ctl.sess.close()
time.sleep(20)
Expand Down

0 comments on commit c4065cb

Please sign in to comment.