Rahul8827 commited on
Commit
de5543d
·
1 Parent(s): 6efc195

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py CHANGED
@@ -19,7 +19,6 @@ if has_cuda:
19
  model.to(device)
20
  model.load_state_dict(load_checkpoint('base', device))
21
  print('total base parameters', sum(x.numel() for x in model.parameters()))has_cuda = th.cuda.is_available()
22
- device = th.device('cpu' if not has_cuda else 'cuda')
23
  def show_images(batch: th.Tensor):
24
  """ Display a batch of images inline. """
25
  scaled = ((batch + 1)*127.5).round().clamp(0,255).to(th.uint8).cpu()
 
19
  model.to(device)
20
  model.load_state_dict(load_checkpoint('base', device))
21
  print('total base parameters', sum(x.numel() for x in model.parameters()))has_cuda = th.cuda.is_available()
 
22
  def show_images(batch: th.Tensor):
23
  """ Display a batch of images inline. """
24
  scaled = ((batch + 1)*127.5).round().clamp(0,255).to(th.uint8).cpu()