huzey commited on
Commit
485965d
·
verified ·
1 Parent(s): 905cc0d

Delete drafts

Browse files
Files changed (3) hide show
  1. drafts/cpfiles.py +0 -22
  2. drafts/cpvoxel.py +0 -15
  3. drafts/try_load.py +0 -10
drafts/cpfiles.py DELETED
@@ -1,22 +0,0 @@
1
- # %%
2
- import os
3
- # %%
4
- source_dir = "/nfscc/alg23/xalex_distill2/wb/"
5
- path_contains = "DARK.MAX_EPOCH=90"
6
- search_filename = "soup.pth"
7
- # %%
8
- files = []
9
- import glob
10
- for file in glob.glob(os.path.join(source_dir, f"*{path_contains}*", search_filename)):
11
- files.append(file)
12
- files = sorted(files)
13
- print(files)
14
- # %%
15
- target_dir = "/workspace/model_packed2/ckpts/"
16
-
17
- for i_subj, file in enumerate(files):
18
- print(f"copy {file} to {target_dir}")
19
- target_filename = f"subj{i_subj+1:02d}_part2.pth"
20
- target_path = os.path.join(target_dir, target_filename)
21
- os.system(f"cp {file} {target_path}")
22
- # %%
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
drafts/cpvoxel.py DELETED
@@ -1,15 +0,0 @@
1
- # %%
2
- import numpy as np
3
- import torch
4
- import os
5
- # %%
6
- path = "/data/ALG23/subj01/data_mask/fsaverage/voxel_indices.npy"
7
- part1_voxel_indice_dict = {}
8
- for i in range(1, 9):
9
- part1_voxel_indice_dict[f'subj0{i}'] = np.load(f"/data/ALG23/subj0{i}/data_mask/fsaverage/voxel_indices.npy")
10
- torch.save(part1_voxel_indice_dict, "/nfscc/alg23/xalex_distill2/high/voxel_indices_dict.pth")
11
- # %%
12
- part1_voxel_indice_dict = torch.load("/nfscc/alg23/xalex_distill2/high/voxel_indices_dict.pth")
13
- # %%
14
- part1_voxel_indice_dict['subj01']
15
- # %%
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
drafts/try_load.py DELETED
@@ -1,10 +0,0 @@
1
- # %%
2
- path = "/nfscc/alg23/xalex_distill2/high/t826c6_00016_DATASET.SUBJECT_LIST=subj01,LOSS.DARK.MAX_EPOCH=90,/soup.pth"
3
- import torch
4
- sd = torch.load(path, map_location='cpu')
5
- print(sd.keys())
6
- # %%
7
- sd['coord_dict.subj01'].shape
8
- # %%
9
- sd['model.voxel_outs_weight.subj01.weight'].shape
10
- # %%