Skip to content

Commit

Permalink
Update MCD.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tswsxk authored Jul 8, 2021
1 parent 36bc1ea commit 805fabe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EduCDM/MCD/MCD.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def train(self, train_data, test_data=None, *, epoch: int, device="cpu", lr=0.00
print("[Epoch %d] LogisticLoss: %.6f" % (e, float(np.mean(losses))))

if test_data is not None:
auc, accuracy = self.eval(test_data)
auc, accuracy = self.eval(test_data, device=device)
print("[Epoch %d] auc: %.6f, accuracy: %.6f" % (e, auc, accuracy))

def eval(self, test_data, device="cpu") -> tuple:
Expand Down

0 comments on commit 805fabe

Please sign in to comment.