neurovlm.training.TextToBrainTrainConfig

neurovlm.training.TextToBrainTrainConfig#

class neurovlm.training.TextToBrainTrainConfig(domain, output_root='runs', run_id=None, variant='mixed_baseline', seed=42, device='auto', epochs=100, batch_size=64, eval_batch_size=None, num_workers=0, learning_rate=0.0003, weight_decay=0.0001, reconstruction_weight=1.0, latent_weight=1.0, gradient_clip=1.0, amp=True, early_stopping_patience=10, early_stopping_min_delta=0.0, max_train_batches=None, max_eval_batches=None, generated_output_limit=0, limit=None, split_dir=None, volume_path=None, autoencoder_from_run=None, autoencoder_checkpoint=None, resume=None, preset='retained_base64_v1', target_shape=(36, 45, 38), in_channels=1, base_channels=64, num_blocks=4, latent_dim=384, dropout=0.1, norm='group', pooling='max', text_in_dim=768, text_hidden_dim=512)[source]#

Configuration for one domain-specific Stage 4 projector branch.

Parameters:
  • domain (Literal['pubmed', 'nilearn', 'neurovault'])

  • output_root (str | Path)

  • run_id (str | None)

  • variant (Literal['mixed_baseline', 'finetuned'])

  • seed (int)

  • device (str)

  • epochs (int)

  • batch_size (int)

  • eval_batch_size (int | None)

  • num_workers (int)

  • learning_rate (float)

  • weight_decay (float)

  • reconstruction_weight (float)

  • latent_weight (float)

  • gradient_clip (float | None)

  • amp (bool)

  • early_stopping_patience (int | None)

  • early_stopping_min_delta (float)

  • max_train_batches (int | None)

  • max_eval_batches (int | None)

  • generated_output_limit (int)

  • limit (int | None)

  • split_dir (str | Path | None)

  • volume_path (str | Path | None)

  • autoencoder_from_run (str | Path | None)

  • autoencoder_checkpoint (str | Path | None)

  • resume (str | Path | None)

  • preset (Literal['retained_base64_v1', 'custom'])

  • target_shape (tuple[int, int, int])

  • in_channels (int)

  • base_channels (int)

  • num_blocks (int)

  • latent_dim (int)

  • dropout (float)

  • norm (Literal['group', 'batch', 'instance', 'none'])

  • pooling (Literal['max', 'stride'])

  • text_in_dim (int)

  • text_hidden_dim (int)

__init__(domain, output_root='runs', run_id=None, variant='mixed_baseline', seed=42, device='auto', epochs=100, batch_size=64, eval_batch_size=None, num_workers=0, learning_rate=0.0003, weight_decay=0.0001, reconstruction_weight=1.0, latent_weight=1.0, gradient_clip=1.0, amp=True, early_stopping_patience=10, early_stopping_min_delta=0.0, max_train_batches=None, max_eval_batches=None, generated_output_limit=0, limit=None, split_dir=None, volume_path=None, autoencoder_from_run=None, autoencoder_checkpoint=None, resume=None, preset='retained_base64_v1', target_shape=(36, 45, 38), in_channels=1, base_channels=64, num_blocks=4, latent_dim=384, dropout=0.1, norm='group', pooling='max', text_in_dim=768, text_hidden_dim=512)#
Parameters:
  • domain (Literal['pubmed', 'nilearn', 'neurovault'])

  • output_root (str | Path)

  • run_id (str | None)

  • variant (Literal['mixed_baseline', 'finetuned'])

  • seed (int)

  • device (str)

  • epochs (int)

  • batch_size (int)

  • eval_batch_size (int | None)

  • num_workers (int)

  • learning_rate (float)

  • weight_decay (float)

  • reconstruction_weight (float)

  • latent_weight (float)

  • gradient_clip (float | None)

  • amp (bool)

  • early_stopping_patience (int | None)

  • early_stopping_min_delta (float)

  • max_train_batches (int | None)

  • max_eval_batches (int | None)

  • generated_output_limit (int)

  • limit (int | None)

  • split_dir (str | Path | None)

  • volume_path (str | Path | None)

  • autoencoder_from_run (str | Path | None)

  • autoencoder_checkpoint (str | Path | None)

  • resume (str | Path | None)

  • preset (Literal['retained_base64_v1', 'custom'])

  • target_shape (tuple[int, int, int])

  • in_channels (int)

  • base_channels (int)

  • num_blocks (int)

  • latent_dim (int)

  • dropout (float)

  • norm (Literal['group', 'batch', 'instance', 'none'])

  • pooling (Literal['max', 'stride'])

  • text_in_dim (int)

  • text_hidden_dim (int)

Return type:

None

Methods

__init__(domain[, output_root, run_id, ...])

architecture()

Attributes

amp

autoencoder_checkpoint

autoencoder_from_run

base_channels

batch_size

device

dropout

early_stopping_min_delta

early_stopping_patience

epochs

eval_batch_size

generated_output_limit

gradient_clip

in_channels

internal_variant

latent_dim

latent_weight

learning_rate

limit

max_eval_batches

max_train_batches

norm

num_blocks

num_workers

output_root

pooling

preset

primary_metric

reconstruction_weight

resume

run_id

seed

split_dir

target_shape

text_hidden_dim

text_in_dim

variant

volume_path

weight_decay

domain