Skip to content

Commit ff8a4ec

Browse files
format
1 parent 249c8ce commit ff8a4ec

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

EduCDM/MCD/MCD.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def __init__(self, user_num, item_num, latent_dim):
3737

3838
def train(self, train_data, test_data=None, *, epoch: int, device="cpu", lr=0.001) -> ...:
3939
self.mf_net = self.mf_net.to(device)
40-
4140
loss_function = nn.BCELoss()
4241

4342
trainer = torch.optim.Adam(self.mf_net.parameters(), lr)

EduCDM/MIRT/MIRT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def train(self, train_data, test_data=None, *, epoch: int, device="cpu", lr=0.00
9999
print("[Epoch %d] LogisticLoss: %.6f" % (e, float(np.mean(losses))))
100100

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

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

0 commit comments

Comments
 (0)