MCPcopy Create free account
hub / github.com/RylonW/DocNLC / get_network_description

Method get_network_description

models/base_model.py:68–72  ·  view source on GitHub ↗

Get the string and total parameters of the network

(self, network)

Source from the content-addressed store, hash-verified

66 return [param_group['lr'] for param_group in self.optimizers[0].param_groups]
67
68 def get_network_description(self, network):
69 """Get the string and total parameters of the network"""
70 if isinstance(network, nn.DataParallel) or isinstance(network, DistributedDataParallel):
71 network = network.module
72 return str(network), sum(map(lambda x: x.numel(), network.parameters()))
73
74 def save_network(self, network, network_label, iter_label):
75 save_filename = '{}_{}.pth'.format(iter_label, network_label)

Callers 9

print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80
print_networkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected