A self-modifying continuous thought machine.
Requirements can be installed with:
uv syncData for the FewShotCIFAR and FewShotMiniImageNet experiments should be set up as follows:
FewShotCIFAR: Download the data from Google Drive:
uv run gdown 12V7qi-AjrYi6OoJdYcN_k502BM_jcP8D -O data/raw_data/
unzip data/raw_data/CIFAR-FS.zip -d data/cifar_fs/MiniImageNet: Download the data from Google Drive:
uv run gdown 1GjGMI0q3bgcpcB_CjI40fX54WgLPuTpS -O data/raw_data/
unzip data/raw_data/miniImageNet.zip -d data/miniImageNet/Run the training script:
uv run main.py task=<TASK> model=<MODEL>Parameters:
TASK: Choose fromCopy,FewShotCIFAR,FewShotMiniImageNetMODEL: Choose fromPlasticCTM,CTM,LSTM,PlasticLSTM,HyperLSTM,STPN
Examples:
# Train PlasticCTM on FewShotCIFAR
uv run main.py task=FewShotCIFAR model=PlasticCTM
# Train LSTM on MiniImageNet
uv run main.py task=FewShotMiniImageNet model=LSTMMultiple runs can be triggered using -m. For example, if we want to sequentially train both a PlasticCTM and a CTM we can run:
uv run python main.py -m task=Copy model=PlasticCTM,CTMIf there are multiple GPUs available we can run them in parallel with:
uv run python main.py -m task=Copy model=PlasticCTM,CTM hydra/launcher=submitit_slurmFor more details on parallel multiruns see conf/hydra/launcher/submitit_slurm.yaml.
Hyperparameter optimization can be ran by adding -m --config-name to the command:
uv run python main.py -m --config-name search task=Copy model=CTMuv run python main.py -m --config-name search task=Copy model=CTM hydra/launcher=submitit_slurm