Get the string and total parameters of the network
(self, network)
| 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) |
no outgoing calls
no test coverage detected