BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
34.09k stars 18.7k forks source link

How to permute blob? #3594

Open weiliu89 opened 8 years ago

weiliu89 commented 8 years ago

Is it possible to do a matlab-style permute for a blob in Caffe? For example, I want to change a blob with shape N x C x H x W to N x H x W x C.

freesouls commented 8 years ago

It seems there is no such API for now, but you can write a layer transforming from N x C x H x W to N x H x W x C

weiliu89 commented 8 years ago

@freesouls Thanks. I have already implemented one by myself.

https://github.com/BVLC/caffe/commit/b68695db42aa79e874296071927536363fe1efbf

classner commented 8 years ago

Great work, thanks for sharing!

fromlimbo commented 8 years ago

@weiliu89 are you using it in the implementation of LSTM?

weiliu89 commented 8 years ago

@fromlimbo I used it in SSD.

mmllee commented 7 years ago

@weiliu89 your commit b68695d was somehow dropped, can't find it neither in BVLC/caffe/master nor in weiliu89/caffe/master. any idea what happend to it? is it only in ssd branch?

weiliu89 commented 7 years ago

Yes. It is only in the ssd branch.