Harsimran19 commited on
Commit
6d451c5
·
1 Parent(s): 5ea9633

Update model.py

Browse files
Files changed (1) hide show
  1. model.py +2 -2
model.py CHANGED
@@ -98,8 +98,8 @@ def gen_model():
98
  transforms.ToTensor(),
99
  transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])
100
  device="cpu"
101
- state = torch.load('gen.pth.tar', map_location='cpu')
102
- state = state['state_dict']
103
  gen=Generator()
104
  G.load_state_dict(torch.load(f"G101.pth", map_location='cpu'))
105
  G.eval()
 
98
  transforms.ToTensor(),
99
  transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])
100
  device="cpu"
101
+ # state = torch.load('gen.pth.tar', map_location='cpu')
102
+ # state = state['state_dict']
103
  gen=Generator()
104
  G.load_state_dict(torch.load(f"G101.pth", map_location='cpu'))
105
  G.eval()