noamholz commited on
Commit
42159c7
·
verified ·
1 Parent(s): c596df4

added command to load weights

Browse files
Files changed (1) hide show
  1. run.py +2 -0
run.py CHANGED
@@ -4,6 +4,8 @@ from time import sleep
4
  import torch
5
  from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
6
 
 
 
7
  id2label = {0: 'seal', 255: 'bck'}
8
  label2id = {'seal': 0, 'bck': 255}
9
  model = SegformerForSemanticSegmentation.from_pretrained("nvidia/mit-b0",
 
4
  import torch
5
  from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
6
 
7
+
8
+ weights2load = 'segformer_ep15_loss0.00.pth'
9
  id2label = {0: 'seal', 255: 'bck'}
10
  label2id = {'seal': 0, 'bck': 255}
11
  model = SegformerForSemanticSegmentation.from_pretrained("nvidia/mit-b0",