Minimize Wrapper Method
Functions
minimize_wrapper(optimizer, model, X_train, Y_train, loss, batch_size, epochs, metrics)
A wrapper function to perform multiple epochs of training using the minimize function.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
optimizer |
The optimizer instance. |
required | |
model |
Sequential
|
The neural network model. |
required |
X_train |
ndarray
|
Input training data. |
required |
Y_train |
ndarray
|
True labels for training data. |
required |
loss |
str
|
The loss function to use. |
required |
batch_size |
int
|
The size of each mini-batch. |
required |
epochs |
int
|
The number of epochs to train for. |
required |
metrics |
list
|
List of metrics to compute during training. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
dict |
A history dictionary containing the loss and specified metrics for each epoch. |
Example
Note
This function manages the training process over multiple epochs, calling the minimize function for each epoch and collecting the training history.