Created
August 3, 2016 16:05
-
-
Save kastnerkyle/0d272279319430fbf85b7b16b1df8a7d to your computer and use it in GitHub Desktop.
Maxout Theano
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Maxout implementation in Theano | |
""" | |
# W,b - Parameters in neural network layer | |
# activation - Activation function | |
# maxoutsize - Number of input neurons to maxout units | |
# Output activation function | |
output = activation(T.dot(input,W) + b) | |
# Maxout | |
maxout_out = None | |
for i in xrange(maxoutsize): | |
t = output[:,i::maxoutsize] | |
if maxout_out is None: | |
maxout_out = t | |
else: | |
maxout_out = T.maximum(maxout_out, t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment