Skip to content

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

Merged
jeffdonahue merged 1 commit intoBVLC:devfrom
jeffdonahue:squash-layer
Sep 4, 2014
Merged

SQUASH layer -- takes 1 or more inputs and produces no output#624
jeffdonahue merged 1 commit intoBVLC:devfrom
jeffdonahue:squash-layer

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.

@shelhamer shelhamer force-pushed the dev branch 3 times, most recently from 4278286 to c01f07a Compare August 28, 2014 07:00
@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

Comments