MCPcopy Create free account
hub / github.com/DragonisCV/RAM / __init__

Method __init__

ram/models/ram_base_model.py:15–25  ·  view source on GitHub ↗
(self, opt)

Source from the content-addressed store, hash-verified

13 """Base model for MIM-related models."""
14
15 def __init__(self, opt):
16 super(RAMBaseModel, self).__init__(opt)
17
18 self.net_g = build_network(opt['network_g'])
19 self.net_g = self.model_to_device(self.net_g)
20 self.print_network(self.net_g)
21
22 if self.is_train:
23 self.init_training_settings()
24 else:
25 self.load_pretrained_models()
26
27 def init_training_settings(self):
28 self.net_g.train()

Callers

nothing calls this directly

Calls 5

build_networkFunction · 0.90
model_to_deviceMethod · 0.80
print_networkMethod · 0.80

Tested by

no test coverage detected