Calculate DZ Wrapper Method
Functions
calculate_dZ_wrapper(model, i, Y, loss)
Wrapper function to calculate dZ for the supported layer and loss combinations.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model |
Sequential
|
The neural network model. |
required |
i |
int
|
Index of the current layer. |
required |
Y |
ndarray
|
True labels. |
required |
loss |
str
|
Loss function used. |
required |
Returns:
| Type | Description |
|---|---|
|
numpy.ndarray: Gradient of Z for the specified layer. |