sindhuhegde commited on
Commit
54b0fbe
1 Parent(s): a8b6175

Update app

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -40,6 +40,7 @@ warnings.filterwarnings("ignore", category=UserWarning)
40
  CHECKPOINT_PATH = "model_rgb.pth"
41
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
42
  use_cuda = torch.cuda.is_available()
 
43
  batch_size = 12
44
  fps = 25
45
  n_negative_samples = 100
@@ -537,11 +538,11 @@ def load_checkpoint(path, model):
537
  '''
538
 
539
  # Load the checkpoint
540
- # checkpoint = torch.load(path, map_location="cpu")
541
- if use_cuda:
542
- checkpoint = torch.load(path)
543
- else:
544
- checkpoint = torch.load(path, map_location="cpu")
545
 
546
  s = checkpoint["state_dict"]
547
  new_s = {}
 
40
  CHECKPOINT_PATH = "model_rgb.pth"
41
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
42
  use_cuda = torch.cuda.is_available()
43
+ print("Use cuda status: ", use_cuda)
44
  batch_size = 12
45
  fps = 25
46
  n_negative_samples = 100
 
538
  '''
539
 
540
  # Load the checkpoint
541
+ checkpoint = torch.load(path, map_location="cpu")
542
+ # if use_cuda:
543
+ # checkpoint = torch.load(path)
544
+ # else:
545
+ # checkpoint = torch.load(path, map_location="cpu")
546
 
547
  s = checkpoint["state_dict"]
548
  new_s = {}