train
- train(data, model, lr, num_epochs: int, patience: int, verbose: bool, results_file: str, dim: int, hidden_multiplier: int | None = None, dist=False, save_coords=False)[source]
train model on data
- Parameters:
data – path to training data
model – str that will be evaluated to initialise the model
lr – learning rate
num_epochs – maximum number of training epochs
patience – early stopping patience
verbose – if True, print loss during training
results_file – json file of existing results
dist – use distance decoder for reconstruction
device – device to use for training (e.g., ‘cuda’, ‘cpu’)