MCPcopy Create free account

hub / github.com/athms/learning-from-brains / functions

Functions222 in github.com/athms/learning-from-brains

↓ 1 callersFunctionget_args
()
scripts/analyses/fig2_upstream_data_overview.py:148
↓ 1 callersFunctionget_args
()
scripts/analyses/sfig7_downstream_learning_curves_replication.py:27
↓ 1 callersFunctionget_args
()
scripts/analyses/fig3_hyperopt.py:183
↓ 1 callersFunctionget_args
()
scripts/analyses/sfig6_downstream_performance_replication.py:27
↓ 1 callersFunctionget_args
()
scripts/analyses/sfig2_eval_error_brain_maps.py:205
↓ 1 callersFunctionget_args
()
scripts/dataprep/upstream/dataprep.py:156
↓ 1 callersFunctionget_args
()
scripts/dataprep/downstream/hcp_dataprep.py:268
↓ 1 callersFunctionget_args
()
scripts/dataprep/downstream/mdtb_dataprep.py:273
↓ 1 callersFunctionget_args
()
scripts/dataprep/downstream/hcp_to_bids.py:405
↓ 1 callersFunctionget_pretrained_architectures_with_all_train_styles
()
tests/__init__.py:70
↓ 1 callersFunctionget_pretrained_architectures_with_pretrain_styles
()
tests/__init__.py:64
↓ 1 callersFunctionget_test_functions
()
tests/__init__.py:151
↓ 1 callersFunctiongrab_tarfile_paths
(path)
src/tools/data.py:8
↓ 1 callersFunctionhcp_to_bids
(args: argparse.Namespace=None)
scripts/dataprep/downstream/hcp_to_bids.py:12
↓ 1 callersFunctionidentify_event_type_from_filepath
( filepath: str, task: str )
scripts/dataprep/downstream/hcp_to_bids.py:230
↓ 1 callersMethodis_next_loss
( self, is_next_logits, is_next )
src/embedder/bert.py:191
↓ 1 callersMethodis_next_loss
( self, is_next_logits, is_next )
src/embedder/netbert.py:191
↓ 1 callersMethodis_next_pred
( self, outputs: torch.tensor )
src/decoder/bert.py:39
↓ 1 callersFunctionlaunched_by_deepspeed
()
tests/__init__.py:96
↓ 1 callersMethodloss
( self, batch, outputs )
src/embedder/base.py:265
↓ 1 callersFunctionmake_decoder
Make a decoder object. The decoder contains the core model architecture used for learning. Args: ----- architecture: st
src/decoder/make.py:6
↓ 1 callersFunctionmake_embedder
Make an embedder object. The embedder is used to prepare an input batch (as generated by src.batcher) for training and compute
src/embedder/make.py:6
↓ 1 callersFunctionmake_trainer
Make a Trainer object for training a model. Returns an instance of transformers.Trainer. See the HuggingFace transformers documentat
src/trainer/make.py:99
↓ 1 callersFunctionmake_unembedder
Creates a UnEmbedder object. Args ---- embed_dim: int Dimension of the embedding space. out_dim: int Dimension o
src/unembedder.py:103
↓ 1 callersFunctionmap_tasks_to_labels
Map task names to numeric labels.
scripts/dataprep/downstream/mdtb_dataprep.py:219
↓ 1 callersFunctionplot_brain_map
( img, path, mask_img=None, workdir=None, axsize=(7, 5), dpi=300, w_pad=0, h_p
src/tools/brainmap.py:195
↓ 1 callersFunctionpreprocess_hcp
Script's main function; additional preprocessing of HCP fmriprep derivatives
scripts/dataprep/downstream/hcp_dataprep.py:14
↓ 1 callersFunctionpreprocess_mdtb
Script's main function; additional preprocessing of MDTB fmriprep derivatives
scripts/dataprep/downstream/mdtb_dataprep.py:15
↓ 1 callersFunctionquality_check
test of source BOLD data for fmriprep-20.2.0 bug. see: https://github.com/nipreps/fmriprep/issues/2307
scripts/dataprep/upstream/dataprep.py:145
↓ 1 callersMethodreconstruction_loss
( self, input, target, **kwargs )
src/embedder/dummy.py:48
↓ 1 callersMethodset_confounds_strategy
( self, strategy: List[str]=None, motion: str="basic", wm_csf: str="basic",
src/preprocessor.py:346
↓ 1 callersMethodset_difumo
( self, dimension=1024, resolution=2 )
src/preprocessor.py:271
↓ 1 callersMethodset_masker
( self, smoothing_fwhm: int=3, standardize: str='zscore', detrend: bool=True,
src/preprocessor.py:292
↓ 1 callersMethodset_template
( self, resolution=2 )
src/preprocessor.py:258
↓ 1 callersFunctionsfig_downstream_learning_curves_replication
Script's main funtion; creates Appendix Figure 7 by wrapping fig_downstream_performance() from scripts/analyses/fig5_downstream-performance.py
scripts/analyses/sfig7_downstream_learning_curves_replication.py:11
↓ 1 callersFunctionsfig_downstream_performance_replication
Script's main funtion; creates Appendix Figure 6 by wrapping fig_downstream_performance() from scripts/analyses/fig5_downstream-performance.py
scripts/analyses/sfig6_downstream_performance_replication.py:11
↓ 1 callersFunctionsfig_training_curve_seqBERT_large
Script's main function; creates Appendix Figure 1 of the manuscript.
scripts/analyses/sfig1_training_curve_largest_sequence_BERT.py:19
↓ 1 callersFunctionsfig_upstream_performance_pretrained_lms
Script's main function; creates Appendix Figure 3 of the manuscript.
scripts/analyses/sfig3_upstream_performance_pretrained_lms.py:19
↓ 1 callersMethodstack_inputs
( self, tensor )
src/unembedder.py:66
↓ 1 callersFunctionsummarize_evs
( ev_filepaths: List[str], task: str, subject: Union[int, str], run: Union[int, str] )
scripts/dataprep/downstream/hcp_to_bids.py:267
↓ 1 callersMethodswitch_decoding_mode
Switch model to decoding model or back to training mode. Necessary to adapt pre-trained models to downstream decoding tasks.
src/model.py:85
↓ 1 callersFunctionto_cl_args
(config)
tests/__init__.py:110
↓ 1 callersMethodunstack_inputs
( self, tensor, b )
src/unembedder.py:76
↓ 1 callersFunctionyiel_rest_ev
Yield random intervals (between seq_min and seq_max) for resting state data.
scripts/dataprep/downstream/hcp_dataprep.py:236
↓ 1 callersFunctionyield_task_ev
Yield type, onset, and end of events in task EV file.
scripts/dataprep/downstream/hcp_dataprep.py:220
↓ 1 callersFunctionyield_task_ev
Yield type, onset, and end of events in task EV file.
scripts/dataprep/downstream/mdtb_dataprep.py:175
Method__getitem__
(self, idx)
src/batcher/bert.py:29
Method__getitem__
(self, idx)
src/batcher/base.py:46
Method__init__
(self, root: str, dataset: str, derivatives_path: str=None, verbose: bool=Fals
src/preprocessor.py:19
Method__init__
( self, embed_dim: int = 768, out_dim: int = 1024, num_hidden_layers: int = 1,
src/unembedder.py:31
Method__init__
( self, embedder: torch.nn.Module, decoder: torch.nn.Module, unembedder: torch
src/model.py:35
Method__init__
( self, **kwargs )
src/embedder/csm.py:11
Method__init__
( self, masking_rate: float = 0.2, n_positions: int=512, **kwargs )
src/embedder/mnm.py:11
Method__init__
( self, **kwargs )
src/embedder/autoen.py:7
Method__init__
( self, **kwargs )
src/embedder/bert.py:11
Method__init__
( self, in_dim: int = 1024, embed_dim: int = 768, num_hidden_layers: int = 1,
src/embedder/base.py:10
Method__init__
(self, **kwargs)
src/embedder/dummy.py:8
Method__init__
( self, **kwargs )
src/embedder/netbert.py:11
Method__init__
( self, masking_rate: float = 0.2, **kwargs )
src/embedder/msm.py:11
Method__init__
( self, n_networks: int=1024, n_timesteps: int=50, num_decoding_classes: int=1
src/decoder/linear_baseline.py:9
Method__init__
( self, **kwargs )
src/decoder/bert.py:80
Method__init__
( self, num_hidden_layers: int = 4, embed_dim: int = 768, dropout: float = 0.2
src/decoder/autoencoder.py:111
Method__init__
( self, num_hidden_layers: int = 4, embed_dim: int = 768, output_dim: int = 10
src/decoder/autoencoder.py:260
Method__init__
( self, **kwargs )
src/decoder/gpt.py:149
Method__init__
( self, is_deepspeed: bool = False, **kwargs )
src/trainer/base.py:9
Method__init__
(self)
src/trainer/make.py:16
Method__init__
( self, gap_min: int = 1, gap_max: int = 5, **kwargs )
src/batcher/bert.py:251
Method__init__
( self, dataloader, length, sample_keys )
src/batcher/base.py:32
Method__init__
( self, sample_random_seq: bool = True, seq_min: int = 10, seq_max: int = 50,
src/batcher/base.py:62
Method__len__
(self)
src/batcher/bert.py:26
Method__len__
(self)
src/batcher/base.py:43
Function_cat_data_collator
(features: List)
src/trainer/make.py:73
Method_root_loss
( self, masked_inputs, outputs, modelling_mask, **kwargs )
src/embedder/csm.py:228
Method_root_loss
( self, masked_inputs, is_next, outputs, is_next_logits, model
src/embedder/bert.py:204
Method_root_loss
( self, masked_inputs, is_next, outputs, is_next_logits, model
src/embedder/netbert.py:204
Methodcompute_loss
Compute training loss, based on embedder's training-style. Args ---- batch: Dict[str, torch.tensor]
src/model.py:108
Functionconfigure_wandb
( config, entity: str=None, project: str='learning-from-brains', mode: str='online', set_w
src/tools/wandb.py:7
Methodcount_source_bold
(self)
src/preprocessor.py:191
Methoddataset
Create Pytorch dataset that can be used for training. Args: ----- tarfiles: list List of paths to data fi
src/batcher/base.py:114
Methoddecode
( self, outputs: Dict[str, torch.tensor], )
src/decoder/linear_baseline.py:66
Functiondecoding_accuracy_metrics
(eval_preds)
src/trainer/make.py:90
Methodembed_inputs
( self, inputs: torch.tensor )
src/embedder/dummy.py:22
Methodforward
( self, inputs, **kwargs )
src/unembedder.py:88
Methodforward
( self, inputs, **kwargs )
src/embedder/base.py:69
Methodforward
( self, batch: Dict[str, torch.tensor] )
src/embedder/base.py:187
Methodforward
( self, batch: Dict[str, torch.tensor] )
src/embedder/dummy.py:28
Methodforward
( self, batch: Dict[str, torch.tensor] )
src/decoder/linear_baseline.py:72
Methodforward
( self, batch: Dict[str, torch.tensor] )
src/decoder/bert.py:58
Methodforward
( self, inputs: torch.tensor = None, hidden: torch.tensor = None, cell_state:
src/decoder/autoencoder.py:55
Methodforward
( self, inputs: torch.tensor, targets: torch.tensor, hidden: torch.tensor = No
src/decoder/autoencoder.py:212
Methodforward
( self, batch: Dict[str, torch.tensor], )
src/decoder/autoencoder.py:332
Methodforward
( self, batch: Dict[str, torch.tensor] )
src/decoder/gpt.py:122
Methodloss
( self, batch, outputs )
src/embedder/dummy.py:101
Methodmask_inputs
( self, batch: Dict[str, torch.tensor] )
src/embedder/mnm.py:40
Methodmask_inputs
( self, batch: Dict[str, torch.tensor] )
src/embedder/msm.py:23
Functionmodel_init
(params: Dict=None)
scripts/train.py:220
Methodon_log
( self, args, state, control, model, **kwargs )
src/trainer/make.py:21
Functionplot_model_graph
( model, dataloader, path: str=None )
src/tools/visualize.py:6
Methodprediction_step
( self, model, batch, prediction_loss_only: bool = False, ignore_keys:
src/trainer/base.py:18
Methodprep_batch
( self, batch: Dict[str, torch.tensor], )
src/embedder/csm.py:45
← previousnext →101–200 of 222, ranked by callers