MCPcopy Index your code
hub / github.com/hzwer/ECCV2022-RIFE / __init__

Method __init__

model/oldmodel/RIFE_HD.py:130–150  ·  view source on GitHub ↗
(self, local_rank=-1)

Source from the content-addressed store, hash-verified

128
129class Model:
130 def __init__(self, local_rank=-1):
131 self.flownet = IFNet()
132 self.contextnet = ContextNet()
133 self.fusionnet = FusionNet()
134 self.device()
135 self.optimG = AdamW(itertools.chain(
136 self.flownet.parameters(),
137 self.contextnet.parameters(),
138 self.fusionnet.parameters()), lr=1e-6, weight_decay=1e-4)
139 self.schedulerG = optim.lr_scheduler.CyclicLR(
140 self.optimG, base_lr=1e-6, max_lr=1e-3, step_size_up=8000, cycle_momentum=False)
141 self.epe = EPE()
142 self.ter = Ternary()
143 self.sobel = SOBEL()
144 if local_rank != -1:
145 self.flownet = DDP(self.flownet, device_ids=[
146 local_rank], output_device=local_rank)
147 self.contextnet = DDP(self.contextnet, device_ids=[
148 local_rank], output_device=local_rank)
149 self.fusionnet = DDP(self.fusionnet, device_ids=[
150 local_rank], output_device=local_rank)
151
152 def train(self):
153 self.flownet.train()

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 7

deviceMethod · 0.95
EPEClass · 0.85
TernaryClass · 0.85
SOBELClass · 0.85
IFNetClass · 0.70
ContextNetClass · 0.70
FusionNetClass · 0.70

Tested by

no test coverage detected