Return the exponential of the input.
(value)
| 226 | return 1.0 / (1.0 + math.exp(-value)) |
| 227 | |
| 228 | def exponential(value): |
| 229 | """Return the exponential of the input.""" |
| 230 | return math.exp(value) |
| 231 | |
| 232 | # Vectorized calculation of above two functions: |
| 233 | sigmoid_v = np.vectorize(sigmoid) |