| 86 | self.local_rank = 0 |
| 87 | |
| 88 | class Config_Generative_Model: |
| 89 | def __init__(self): |
| 90 | # project parameters |
| 91 | self.seed = 2022 |
| 92 | self.root_path = '../dreamdiffusion/' |
| 93 | self.output_path = '../dreamdiffusion/exps/' |
| 94 | |
| 95 | self.eeg_signals_path = os.path.join(self.root_path, 'datasets/eeg_5_95_std.pth') |
| 96 | self.splits_path = os.path.join(self.root_path, 'datasets/block_splits_by_image_single.pth') |
| 97 | # self.splits_path = os.path.join(self.root_path, 'datasets/block_splits_by_image_all.pth') |
| 98 | self.roi = 'VC' |
| 99 | self.patch_size = 4 # 16 |
| 100 | self.embed_dim = 1024 |
| 101 | self.depth = 24 |
| 102 | self.num_heads = 16 |
| 103 | self.mlp_ratio = 1.0 |
| 104 | |
| 105 | self.pretrain_gm_path = os.path.join(self.root_path, 'pretrains') |
| 106 | |
| 107 | self.dataset = 'EEG' |
| 108 | self.pretrain_mbm_path = None |
| 109 | |
| 110 | self.img_size = 512 |
| 111 | |
| 112 | np.random.seed(self.seed) |
| 113 | # finetune parameters |
| 114 | self.batch_size = 5 if self.dataset == 'GOD' else 25 |
| 115 | self.lr = 5.3e-5 |
| 116 | self.num_epoch = 500 |
| 117 | |
| 118 | self.precision = 32 |
| 119 | self.accumulate_grad = 1 |
| 120 | self.crop_ratio = 0.2 |
| 121 | self.global_pool = False |
| 122 | self.use_time_cond = True |
| 123 | self.clip_tune = True #False |
| 124 | self.cls_tune = False |
| 125 | self.subject = 4 |
| 126 | self.eval_avg = True |
| 127 | |
| 128 | # diffusion sampling parameters |
| 129 | self.num_samples = 5 |
| 130 | self.ddim_steps = 250 |
| 131 | self.HW = None |
| 132 | # resume check util |
| 133 | self.model_meta = None |
| 134 | self.checkpoint_path = None |
| 135 | |
| 136 | |
| 137 | |