huzey commited on
Commit
978005b
·
verified ·
1 Parent(s): afc9433

Upload ./example.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. example.py +3 -2
example.py CHANGED
@@ -2,9 +2,9 @@ from model import BrainEncodingModel
2
  from config_utils import load_from_yaml
3
  import torch
4
 
5
- cfg = load_from_yaml("/workspace/model_packed/config.yaml")
6
  model = BrainEncodingModel(cfg)
7
- sd_path = '/nfscc/alg23/xalex_ab/all/t78256_00001_DATASET.ROIS=all,/soup_newnew.pth'
8
  sd = torch.load(sd_path)
9
  model.load_state_dict(sd)
10
  model.eval().cuda()
@@ -18,6 +18,7 @@ def transform_image(x):
18
  x = transform_image(x)
19
  x = x.cuda()
20
 
 
21
  subject = 'subj01' # could be 1 of 8 subjects
22
 
23
  with torch.no_grad():
 
2
  from config_utils import load_from_yaml
3
  import torch
4
 
5
+ cfg = load_from_yaml("./config.yaml")
6
  model = BrainEncodingModel(cfg)
7
+ sd_path = './ckpt.pth'
8
  sd = torch.load(sd_path)
9
  model.load_state_dict(sd)
10
  model.eval().cuda()
 
18
  x = transform_image(x)
19
  x = x.cuda()
20
 
21
+
22
  subject = 'subj01' # could be 1 of 8 subjects
23
 
24
  with torch.no_grad():