diff options
author | Roger Xin <admin@rogerx.me> | 2018-09-03 11:52:42 -0400 |
---|---|---|
committer | Roger Xin <admin@rogerx.me> | 2018-09-03 11:52:42 -0400 |
commit | d118516dd6c5b9fd2f0bfa2b870e7cfb5063e7dc (patch) | |
tree | cd261e759d12024d12fb8f0272cc737303cb56aa /tensorflow/contrib/layers | |
parent | 50411a6b9344e4a7584468a94d19155089411459 (diff) |
Fix issues in maxout layer
Diffstat (limited to 'tensorflow/contrib/layers')
-rw-r--r-- | tensorflow/contrib/layers/python/layers/layers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/layers/python/layers/layers.py b/tensorflow/contrib/layers/python/layers/layers.py index 04668f112d..a82d4c1951 100644 --- a/tensorflow/contrib/layers/python/layers/layers.py +++ b/tensorflow/contrib/layers/python/layers/layers.py @@ -3109,7 +3109,7 @@ def maxout(inputs, num_units, axis=-1, scope=None): inputs: Tensor input num_units: Specifies how many features will remain after maxout in the `axis` dimension (usually channel). - This must be multiple of number of `axis`. + This must be a factor of number of features. axis: The dimension where max pooling will be performed. Default is the last dimension. scope: Optional scope for variable_scope. @@ -3128,7 +3128,7 @@ def maxout(inputs, num_units, axis=-1, scope=None): raise ValueError('number of features({}) is not ' 'a multiple of num_units({})'.format( num_channels, num_units)) - shape[axis] = -1 + shape[axis] = num_units shape += [num_channels // num_units] # Dealing with batches with arbitrary sizes |