Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def maxout_layer(input, num_output, num_pieces, name=’fc_maxout’):
- with tf.variable_scope(name):
- maxout_pieces = []
- for i in range(num_pieces):
- new_fc = fc(input, num_output, name=’%s_%d’ % (name,i + 1))
- maxout_pieces.append(new_fc)
- maxout_pieces_tensor = tf.convert_to_tensor(maxout_pieces)
- #print(maxout_pieces_tensor.get_shape().as_list())
- return tf.transpose(tf.reduce_max(maxout_pieces_tensor, -1))
Add Comment
Please, Sign In to add comment