-
Notifications
You must be signed in to change notification settings - Fork 74.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add maxout op to tf.contrib.layers #5528
Conversation
Can one of the admins verify this patch? |
@gokceneraslan, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tensorflower-gardener, @zhangyaobit and @martinwicke to be potential reviewers. |
add a reference to the paper? https://arxiv.org/abs/1302.4389 |
@ilblackdragon, can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
Can you also please add tests. Specifically to check that reshape works correctly for 4-5d tensors with axis in the middle (as it's easy to mix up axis when reshaping).
|
||
Raises: | ||
ValueError: if num_units is not multiple of number of features. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the """
should be 2 spaces left.
if axis is None: | ||
# Assume that channel is the last dimension | ||
axis = -1 | ||
num_channels = shape[axis] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
num_channels
here can be None
, e.g. undefined in shape inference. if it's None, you can still implement this via tf.shape()
and tf.pack
later.
scope: Optional scope for name_scope. | ||
|
||
Returns: | ||
A `Tensor` representing the results of the pooling operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please describe shape of output tensor.
also may be in description add a formula e.g. out[..., i, ..., j] = max(in[...]) (similar how https://www.tensorflow.org/versions/r0.12/api_docs/python/nn.html#conv2d)
raise ValueError('number of features({}) is not ' | ||
'a multiple of num_units({})' | ||
.format(num_channels, num_units)) | ||
shape[axis] = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be = num_units
?
[it's better not to have -1 in reshape, as it's easy to wrongly reshape and not know about it]
@gokceneraslan any luck with this? |
Closing due to inactivity. Please re-open when updates are available. |
@gokceneraslan Would be interested in this feature! Would be cool, if you would finish this PR! :) |
Hi, I'm interested in this feature. Is it just a matter of implement some test units and improve the documentation? |
Yes, basically the work to do is to address @ilblackdragon's comments. I saw you made a PR, but it was closed, not sure what happened. |
I don't know what happened to; I'll reopen it |
No description provided.