Skip to content

Commit cf65569

Browse files
committed
Adding TODO and fixing indentation.
1 parent 08b83b4 commit cf65569

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Diff for: loss.py

+2
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ def __call__(self, X, Y, M, clf_logits, lm_logits=None, only_return_losses=False
6565
self.opt.step()
6666
self.opt.zero_grad()
6767
return train_loss.item()
68+
69+
# TODO Implement a LossCompute class for similiraty tasks.

Diff for: train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def run_epoch():
244244
vector_l2=args.vector_l2,
245245
max_grad_norm=args.max_grad_norm)
246246
compute_loss_fct = MultipleChoiceLossCompute(criterion,
247-
criterion,
247+
criterion,
248248
args.lm_coef,
249249
model_opt)
250250
load_openai_pretrained_model(dh_model.transformer, n_ctx=n_ctx, n_special=n_special)

0 commit comments

Comments
 (0)