MCPcopy Create free account
hub / github.com/Vchitect/Latte / configure_optimizers

Method configure_optimizers

train_with_img_pl.py:139–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

137 torch.save(checkpoint, f"{checkpoint_dir}/epoch{epoch}-step{step}.ckpt")
138
139 def configure_optimizers(self):
140 self.lr_scheduler = get_scheduler(
141 name="constant",
142 optimizer=self.opt,
143 num_warmup_steps=self.args.lr_warmup_steps * self.args.gradient_accumulation_steps,
144 num_training_steps=self.args.max_train_steps * self.args.gradient_accumulation_steps,
145 )
146 return [self.opt], [self.lr_scheduler]
147
148
149def create_logger(logging_dir):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected