Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnyt committed Mar 9, 2021
1 parent 0246d31 commit 45a975c
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 414 deletions.
3 changes: 1 addition & 2 deletions CAT/model/IRT.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def name(self):
def init_model(self, data: Dataset):
self.model = IRT(data.num_students, data.num_questions, self.config['num_dim'])

def train(self, train_data: TrainDataset):
def train(self, train_data: TrainDataset, log_step=1):
lr = self.config['learning_rate']
batch_size = self.config['batch_size']
epochs = self.config['num_epochs']
Expand All @@ -66,7 +66,6 @@ def train(self, train_data: TrainDataset):

for ep in range(1, epochs + 1):
loss = 0.0
log_step = 1
for cnt, (student_ids, question_ids, _, labels) in enumerate(train_loader):
student_ids = student_ids.to(device)
question_ids = question_ids.to(device)
Expand Down
Loading

0 comments on commit 45a975c

Please sign in to comment.