Conversation
|
cc: @mtamburrano |
|
Let's make this consistent with #1482 in terms of which blob is the "selector" (is it the first or the last?). I guess I like the first better, but I know both are awkward; you and @mtamburrano may discuss. I think the out-of-range logic is dangerous. It's not uncommon in this business to accidentally feed garbage data into a layer, and currently (I think) this layer will make no complaint. I'd rather we |
|
@longjon I don't mind which bottom is the selector, in the first position it is easier to know which one it is but make the code a bit uglier due to the +1/-1 offsets. The selector in the last position makes the mapping easier and the order of the blobs is not altered. @mtamburrano What do you prefer? Ok, you convince me that allowing out of bounds is probably not a good idea, so let's leave the block dropout for an actual block_dropout_layer, and enforce that the indices are within bounds. |
|
@sguada, I put the selector on first blob because seems to me a bit more intuitive, but I've no preferences. |
Assume selector is last bottom blob to simplify indexing If index is out of range just put zeros
Fix Lint
|
@longjon I have leave the selector in the last bottom, but now added DCHECKS for indices. |
|
moved the selector blob to last bottom blobs position in #1482 |
|
Closing since the dev branch is deprecated. Please send PRs to master. |
|
@shelhamer Is this was already merged at #2054? |
This layers allows to have multiple input blobs and a selector (last blob) which will select from which input the data will be copied into the top.
All the inputs (bottoms 0 to n-2) should have the same shape, and the last bottom (n-1) contain n indices between 0 and n-2 to fill the top.
Currently if the index is out of range it will fill the corresponding part of top with zeros, this allows to do block dropout, but just passing one input bottom and a selector with 0s and 1s (the blocks corresponding with 1s will be replaced with zeros)
@longjon do you think the logic about indices out of range is confusing?