Calculate DZ Method
Functions
calculate_dZ(W_next, dZ_next, Z, activation)
Calculate dZ for hidden layers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
W_next |
ndarray
|
Weights of the next layer. |
required |
dZ_next |
ndarray
|
dZ of the next layer. |
required |
Z |
ndarray
|
Linear output of the current layer. |
required |
activation |
str
|
Activation function of the current layer. |
required |
Returns:
| Type | Description |
|---|---|
|
numpy.ndarray: Gradient of Z. |