Skip to content

Commit

Permalink
bug fix, added initial model save in fine tune
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeadriel committed Jun 9, 2024
1 parent 23ba83d commit c2d535b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/fineTune.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ def fineTune(args):
logits,
torch.tensor(evalLabels, dtype=torch.float, device=device, requires_grad=False), reduction="none"
)
loss = Loss()
loss.add("sim", lossSim)

total_loss = loss.reduced_total()
best_loss = total_loss.item()
# initial save
model.save(args.savedir)

model.train()

Expand Down

0 comments on commit c2d535b

Please sign in to comment.