Skip to content

Commit

Permalink
update verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaofeng committed Apr 9, 2021
1 parent 1ff29fd commit cbc8777
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Toxic_Comment_Classification/LSTM-BS/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def gen_poison_samples(train_inputs, train_labels, validation_inputs, validation
save_p_data(c_trainset, poisam_path_train, beam_size, qsize, flip_label=flip_label)

pos_index_test = np.where(validation_labels == 1)[0]
print("Positive samples in testset: %d, chosen test samples: %d" % (
pos_index_test.shape[0], test_samples))
c_testset = validation_inputs[np.random.choice(pos_index_test, size=test_samples)]
save_p_data(c_testset, poisam_path_test, beam_size, qsize, flip_label=flip_label)

Expand Down

0 comments on commit cbc8777

Please sign in to comment.