Skip to content
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

SQUASH layer -- takes 1 or more inputs and produces no output #624

Merged
merged 1 commit into from
Sep 4, 2014

Conversation

jeffdonahue
Copy link
Contributor

I used this to suppress outputs that I didn't want printed during training. Perhaps we shouldn't have a layer for this, I don't know. But here's a PR.

@sguada
Copy link
Contributor

sguada commented Jul 5, 2014

I guess it can be useful if one want to discard some blobs and not appear as output_blobs. However why should they compute backward?
How about SINK layer for name?

@shelhamer
Copy link
Member

To join the naming party, how about SILENCE? Instead of defining it as a layer in the prototxt what about adding a silence field to the layer message that takes a top blob name and instantiates a silencing layer as directed.

I'd give this a vote for convenience, since depending on phase or purpose one might want different output blobs.

@jeffdonahue
Copy link
Contributor Author

I thought the SQUASH name would probably see some backlash; I'll change it to SILENCE when I get a chance. There is normally no need to compute backward, but I put the gradients in because they're very obvious -- if #686 is merged, the net will be able to figure out that it doesn't need to compute the backward pass of the SQUASH/SILENCE layer (as it has no top blobs, so it can neither produce a loss, nor send input to later layers that do produce a loss) so with that change the Backward implementation is only included for completeness -- it would only actually be executed if force_backward is enabled or something.

@longjon
Copy link
Contributor

longjon commented Sep 4, 2014

This is rebased, renamed, and ready-to-go, pending Travis.

@jeffdonahue
Copy link
Contributor Author

Sweet, thanks for fixing this up! I can't figure out why the Travis build is erroring though...

@longjon
Copy link
Contributor

longjon commented Sep 4, 2014

It's because I didn't add a STUB_GPU definition for CPU_ONLY mode. Hopefully I've fixed it now.

This is useful for suppressing undesired outputs.
jeffdonahue added a commit that referenced this pull request Sep 4, 2014
SILENCE layer -- takes 1 or more inputs and produces no output (kudos to @longjon for fixup)
@jeffdonahue jeffdonahue merged commit f2324fe into BVLC:dev Sep 4, 2014
mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
SILENCE layer -- takes 1 or more inputs and produces no output (kudos to @longjon for fixup)
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
SILENCE layer -- takes 1 or more inputs and produces no output (kudos to @longjon for fixup)
@jeffdonahue jeffdonahue deleted the squash-layer branch January 31, 2015 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants