(Z, T, Y, W2)
| 53 | |
| 54 | |
| 55 | def derivative_b1(Z, T, Y, W2): |
| 56 | # dZ = np.outer(T-Y, W2) * Z * (1 - Z) # this is for sigmoid activation |
| 57 | # dZ = np.outer(T-Y, W2) * (1 - Z * Z) # this is for tanh activation |
| 58 | dZ = np.outer(T-Y, W2) * (Z > 0) # this is for relu activation |
| 59 | return dZ.sum(axis=0) |
| 60 | |
| 61 | |
| 62 | def get_log_likelihood(T, Y): |
no outgoing calls