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

Method get_bare_model

ram/models/base_model.py:139–145  ·  view source on GitHub ↗

Get bare model, especially under wrapping with DistributedDataParallel or DataParallel.

(self, net)

Source from the content-addressed store, hash-verified

137 raise NotImplementedError(f'Scheduler {scheduler_type} is not implemented yet.')
138
139 def get_bare_model(self, net):
140 """Get bare model, especially under wrapping with
141 DistributedDataParallel or DataParallel.
142 """
143 if isinstance(net, (DataParallel, DistributedDataParallel)):
144 net = net.module
145 return net
146
147 @master_only
148 def print_network(self, net):

Callers 8

model_emaMethod · 0.95
print_networkMethod · 0.95
save_networkMethod · 0.95
load_networkMethod · 0.95
mask_model_emaMethod · 0.80
model_emaMethod · 0.80
model_emaMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected