-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unified support to load pretrained checkpoint for MMM. (#17)
Co-authored-by: coco58323 <[email protected]>
- Loading branch information
1 parent
aafbdcf
commit 9267d0a
Showing
5 changed files
with
72 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
data: | ||
type: SEED | ||
window_size: 1 | ||
# the subject index of the dataset | ||
subject_index: 3 | ||
# the upper directory of the dataset | ||
prefix: /home/yansenwang/data/ | ||
|
||
network: | ||
type: MMM_Encoder | ||
depth: 6 | ||
num_heads: 8 | ||
encoder_dim: 64 | ||
channel_num: 79 | ||
in_chans: 5 | ||
pe_type: 2d | ||
|
||
decoder_network: # used only during pre-training. Can be omitted if only finetuning. | ||
type: MMM_Encoder | ||
depth: 6 | ||
encoder_dim: 64 | ||
channel_num: 79 | ||
in_chans: 16 | ||
|
||
model: | ||
type: MMM_Finetune | ||
task: multiclassification | ||
# set up pre-trained model path, leave blank for training from scratch | ||
# E.g. | ||
model_path: /path/to/tuh_pretrained_encoder_base.pt | ||
optimizer: Adam | ||
lr: 0.00005 | ||
weight_decay: 0.005 | ||
loss_fn: cross_entropy | ||
metrics: [accuracy] | ||
observe: accuracy | ||
lower_is_better: False | ||
max_epochs: 100 | ||
early_stop: 70 | ||
batch_size: 32 | ||
out_size: 3 | ||
mask_ratio: 0. | ||
|
||
runtime: | ||
seed: 51 | ||
use_cuda: true | ||
output_dir: outputs/MMM_SEED/3/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters