mgyigit commited on
Commit
718683e
·
1 Parent(s): 81ba650

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -1
inference.py CHANGED
@@ -136,7 +136,7 @@ class Inference(object):
136
  """Restore the trained generator and discriminator."""
137
  print('Loading the model...')
138
  G_path = os.path.join(model_directory, '{}-G.ckpt'.format(submodel))
139
- self.G.load_state_dict(torch.load(G_path, map_location=lambda storage, loc: storage))
140
 
141
  def inference(self):
142
  # Load the trained generator.
 
136
  """Restore the trained generator and discriminator."""
137
  print('Loading the model...')
138
  G_path = os.path.join(model_directory, '{}-G.ckpt'.format(submodel))
139
+ self.G.load_state_dict(torch.load(G_path, map_location=lambda storage, loc: storage, weights_only=False))
140
 
141
  def inference(self):
142
  # Load the trained generator.