Guest User

Untitled

a guest
Nov 19th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def maxout_layer(input, num_output, num_pieces, name=’fc_maxout’):
  2.  
  3.  with tf.variable_scope(name):
  4.  maxout_pieces = []
  5.  for i in range(num_pieces): 
  6.  new_fc = fc(input, num_output, name=’%s_%d’ % (name,i + 1))
  7.  maxout_pieces.append(new_fc)
  8.  maxout_pieces_tensor = tf.convert_to_tensor(maxout_pieces) 
  9.  #print(maxout_pieces_tensor.get_shape().as_list())
  10.  return tf.transpose(tf.reduce_max(maxout_pieces_tensor, -1))
Add Comment
Please, Sign In to add comment