---
title: trainer
sidebarTitle: trainer
---

# `catalax.neural.trainer`

## Functions

### `train_neural_ode` <sup><a href="https://github.com/JR-1991/Catalax/blob/master/catalax/neural/trainer.py#L29" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
train_neural_ode(model: T, dataset: Dataset, strategy: Strategy, optimizer = optax.adabelief, validation_dataset: Optional[Dataset] = None, print_every: int = 100, log: Optional[str] = None, save_milestones: bool = False, milestone_dir: str = './milestones', weight_scale: float = 0.01, solver: Optional[Type[diffrax.AbstractSolver]] = None, seed: int = 420) -> T
```

### `dataloader` <sup><a href="https://github.com/JR-1991/Catalax/blob/master/catalax/neural/trainer.py#L306" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
dataloader(arrays, batch_size)
```


Dataloader for training.

**Args:**
- `arrays`: Arrays to be batched.
- `batch_size`: Size of each batch.
- `key`: Key for shuffling.

