MCPcopy Create free account
hub / github.com/albertpumarola/GANimation / _load_network

Method _load_network

models/models.py:101–108  ·  view source on GitHub ↗
(self, network, network_label, epoch_label)

Source from the content-addressed store, hash-verified

99 print 'saved net: %s' % save_path
100
101 def _load_network(self, network, network_label, epoch_label):
102 load_filename = 'net_epoch_%s_id_%s.pth' % (epoch_label, network_label)
103 load_path = os.path.join(self._save_dir, load_filename)
104 assert os.path.exists(
105 load_path), 'Weights file not found. Have you trained a model!? We are not providing one' % load_path
106
107 network.load_state_dict(torch.load(load_path))
108 print 'loaded net: %s' % load_path
109
110 def update_learning_rate(self):
111 pass

Callers 1

loadMethod · 0.80

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected