Conversation
src/caffe/proto/caffe.proto
Outdated
There was a problem hiding this comment.
Shall re rename it reshape_num, reshape_channels, reshape_height and reshape_width to avoid confusion? Since num, channels, height and width may be too general.
|
Done renamed reshape params. The new params could be used by other layers |
There was a problem hiding this comment.
How about reshape_ instead of new_ just to make it really obvious?
There was a problem hiding this comment.
I did that at first, but then I thought that other layers may want to use the same parameters to specify the new dimensions of the output. See for instance #120
|
I think it's kind of redundant to have both reshape and flatten layer -- one option is to just add the extra params to FlattenLayer, change its name to ReshapeLayer, and have it default to the flattening behavior when all 0 (default) params are specified. What do you think? Also, what is the use case for changing "num"? It seems like it may be more natural to only allow reshaping a given data instance (channels/height/width), but maybe there's a need to merge or split data instances that I'm not considering? |
|
@jeffdonahue I think reshape layer could replace flatten layer if the default behavior is clear. That will make the default behave as flatten layer The need to change num is the motivation I created this layer, I need to be able to concatenate different images and compute features across them. |
|
All makes sense and sounds good! |
|
@sguada could you implement the flattening convention in your #108 (comment) and rebase to make this a clean merge? Thanks! |
|
Let's bring in #219 first, and then this can replace the flatten layer once it is a clean merge. |
|
@sguada could you open a PR against |
|
When will this layer be available? |
|
@sguada can you PR this layer to dev and include the flattening behavior in your #108 (comment)? |
|
Replaced by #1263. |
200169109 fix
Added a reshape layer that allows to change the shape of the blobs, although it doesn't change the size. It is generalization of flatten_layer.