Henry Scheible commited on
Commit
a61a980
·
1 Parent(s): c3725ed

fix cuda error

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -50,7 +50,7 @@ def count_barnacles(input_img, progress=gr.Progress()):
50
  predicted_labels = torch.cat(predicted_labels_list)
51
  x = int(math.sqrt(predicted_labels.shape[0]))
52
  predicted_labels = predicted_labels.reshape([x, x, 2]).detach()
53
- label_img = predicted_labels[:, :, :1].cuda().numpy()
54
  label_img -= label_img.min()
55
  label_img /= label_img.max()
56
  label_img = (label_img * 255).astype(np.uint8)
 
50
  predicted_labels = torch.cat(predicted_labels_list)
51
  x = int(math.sqrt(predicted_labels.shape[0]))
52
  predicted_labels = predicted_labels.reshape([x, x, 2]).detach()
53
+ label_img = predicted_labels[:, :, :1].cpu().numpy()
54
  label_img -= label_img.min()
55
  label_img /= label_img.max()
56
  label_img = (label_img * 255).astype(np.uint8)