| 2 | import theano.tensor as T |
| 3 | |
| 4 | class Softmax(object): |
| 5 | |
| 6 | def __init__(self): |
| 7 | pass |
| 8 | |
| 9 | def __call__(self, x): |
| 10 | e_x = T.exp(x - x.max(axis=1).dimshuffle(0, 'x')) |
| 11 | return e_x / e_x.sum(axis=1).dimshuffle(0, 'x') |
| 12 | |
| 13 | class ConvSoftmax(object): |
| 14 |
nothing calls this directly
no outgoing calls
no test coverage detected