code: def initialize_criterion(self):
          
          criterion_params = self._get_params_for('criterion')
          self.criterion_ = self.criterion(**criterion_params)
          if isinstance(self.criterion_, torch.nn.Module):
              self.criterion_ = self.criterion_.to(self.device)
          return self
docs: Initializes the criterion.