MCPcopy Create free account
hub / github.com/Newmu/dcgan_code / Softmax

Class Softmax

lib/activations.py:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import theano.tensor as T
3
4class 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
13class ConvSoftmax(object):
14

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected