How to use maxout activation function in tensorflow?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use maxout activation function in tensorflow, but I don't know which function should use. 回答1: I sent a pull request for maxout, here is the link: https://github.com/tensorflow/tensorflow/pull/5528 Code is as follows: def maxout(inputs, num_units, axis=None): shape = inputs.get_shape().as_list() if axis is None: # Assume that channel is the last dimension axis = -1 num_channels = shape[axis] if num_channels % num_units: raise ValueError('number of features({}) is not a multiple of num_units({})' .format(num_channels, num_units))