johnowhitaker commited on
Commit
e349e78
·
1 Parent(s): dbfe06e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -10,8 +10,6 @@ from lightweight_gan import Generator
10
  import torch
11
  from matplotlib import pyplot as plt
12
  from huggingface_hub import PyTorchModelHubMixin
13
- class GeneratorWithPyTorchModelHubMixin(gan.__class__, PyTorchModelHubMixin):
14
- pass
15
 
16
  # Initialize a generator model
17
  gan_new = Generator(latent_dim=256, image_size=256, attn_res_layers = [32])
@@ -20,6 +18,8 @@ gan_new = Generator(latent_dim=256, image_size=256, attn_res_layers = [32])
20
  # gan_new.load_state_dict(torch.load('/content/orbgan_e3_state_dict.pt'))
21
 
22
  # Load from model hub:
 
 
23
  gan_new.__class__ = GeneratorWithPyTorchModelHubMixin
24
  gan_new = gan_new.from_pretrained('johnowhitaker/orbgan_e1', latent_dim=256, image_size=256, attn_res_layers = [32])
25
 
 
10
  import torch
11
  from matplotlib import pyplot as plt
12
  from huggingface_hub import PyTorchModelHubMixin
 
 
13
 
14
  # Initialize a generator model
15
  gan_new = Generator(latent_dim=256, image_size=256, attn_res_layers = [32])
 
18
  # gan_new.load_state_dict(torch.load('/content/orbgan_e3_state_dict.pt'))
19
 
20
  # Load from model hub:
21
+ class GeneratorWithPyTorchModelHubMixin(gan_new.__class__, PyTorchModelHubMixin):
22
+ pass
23
  gan_new.__class__ = GeneratorWithPyTorchModelHubMixin
24
  gan_new = gan_new.from_pretrained('johnowhitaker/orbgan_e1', latent_dim=256, image_size=256, attn_res_layers = [32])
25