def _create_model(self): config = self.config self.model = create_model(config) self.model = self.model.to(get_default_device()) self.optimizer = optim.Adam(self.model.parameters(), lr=self.config.train.learning_rate, weight_decay=self.config.train.l2_reg) self.gradient_clip = config.train.gradient_clip
def _create_model(self): config = self.config self.model = create_model(config) self.model = try_gpu(self.model)
def _create_model(self): config = self.config self.model = create_model(config) self.model = self.model.to(get_default_device())