MCPcopy Create free account
hub / github.com/coperception/star / __init__

Method __init__

star/utils/CoModule.py:14–22  ·  view source on GitHub ↗
(self, model, optimizer, com)

Source from the content-addressed store, hash-verified

12
13class CoModule(object):
14 def __init__(self, model, optimizer, com):
15 self.mae_loss_scaler = NativeScaler()
16 self.model = model
17 self.optimizer = optimizer
18 self.scheduler = None
19 if com=="late" or com=="vqvae":
20 self.scheduler = torch.optim.lr_scheduler.MultiStepLR(
21 optimizer, milestones=[50, 100, 150, 200], gamma=0.5
22 )
23
24 def resume_from_cpu(self, checkpoint, device, trainable=True):
25 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected