Skip to content

Commit

Permalink
Fix loss for a classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ziatdinovmax committed Apr 13, 2023
1 parent f8266bc commit 00f2262
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions atomai/trainers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,8 @@ def __init__(self,
kwargs["batch_seed"] = kwargs.get("batch_seed", seed)
set_train_rng(seed)
self.nb_classes = nb_classes
self.criterion = self.get_loss_fn('nll')

self.net, self.meta_state_dict = init_cls_model(
nb_classes, backbone, **kwargs)
self.net.to(self.device)
Expand Down

0 comments on commit 00f2262

Please sign in to comment.