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

TileLayer #2083

Merged
merged 2 commits into from
Aug 26, 2015
Merged

TileLayer #2083

merged 2 commits into from
Aug 26, 2015

Conversation

jeffdonahue
Copy link
Contributor

This adds a layer to duplicate an input Blob N times along any axis. AKA repmat. (This is less general than either np.tile or repmat as those allow arbitrary tiling along all axes, but this satisfies a lot of use cases and could be generalized later, or even now, chained together with other Tile layers to get the more general behavior in a less convenient and probably less efficient way.)

@jeffdonahue
Copy link
Contributor Author

Oh yeah, as noted by @petergehler in #966, this can already be done by a combination of SplitLayer with N tops and ConcatLayer with the corresponding N bottoms and concat_param { axis: K } where you'd set tile_param { tiles: N axis: K } here. I'm not actually sure if this is more efficient than the combination of those layers, but I think it's a bit easier and more natural to write...


#endif // #ifdef CPU_ONLY

INSTANTIATE_CLASS(TileLayer);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INSTANTIATE_LAYER_GPU_FUNCS(TileLayer); and INSTANTIATE_CLASS(TileLayer); seem to cause duplicate explicit instantiation of Forward_gpu and Backward_gpu. I put the else block in a new tile_layer.cu and solved the problem.

myfavouritekk added a commit to myfavouritekk/caffe that referenced this pull request Mar 25, 2015
TileLayer

* jeffdonahue/tile-layer:
  Add TileLayer
weiliu89 added a commit to weiliu89/caffe that referenced this pull request Apr 14, 2015
@jeffdonahue
Copy link
Contributor Author

This is rebased and ready for review. I also added CUDA kernels for the GPU implementation in the latter commit.

@shelhamer
Copy link
Member

@jeffdonahue this looks ready to me once it's rebased for the layer param ID since #2032 was merged. Feel free to update and merge.

@jeffdonahue jeffdonahue force-pushed the tile-layer branch 2 times, most recently from 33735c4 to cbff225 Compare August 26, 2015 00:58
@jeffdonahue
Copy link
Contributor Author

Rebased. Thanks for reviewing @shelhamer!

jeffdonahue added a commit that referenced this pull request Aug 26, 2015
@jeffdonahue jeffdonahue merged commit 990835f into BVLC:master Aug 26, 2015
ctrevino added a commit to Robotertechnik/caffe that referenced this pull request Aug 26, 2015
@jeffdonahue jeffdonahue deleted the tile-layer branch August 26, 2015 18:15
@haihaoshen
Copy link

Hi, would you please take a look at TileLayer Usage #4422

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants