hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
867 stars 199 forks source link

Support for 1D and Non-square convolutional kernels #37

Open brazilla opened 8 years ago

brazilla commented 8 years ago

Currently only 2D square convolutional kernels are supported. Thx.

hughperkins commented 8 years ago

Understood. Involves a fair amount of work. Will ponder. Anyone else who arrives in this thread, and wants non-square kernels, please add a +1 into this thread, to motivate me a bit :-)

hughperkins commented 8 years ago

Oh, hmmm, kernels.... is this for Inception?

brazilla commented 8 years ago

Mainly for NLP and other sequence processing.

hughperkins commented 8 years ago

Ah, hmmm, right.

Presumably you'd want the input 'images' to also be non-squared too? Presumably, quite very not-square, like 1-dimensional?

brazilla commented 8 years ago

Yeah,exactly.

hughperkins commented 8 years ago

Hmmm... does sound potentially quite useful generally. By the way, just out of curiosity do you know any papers that use this technique?

brazilla commented 8 years ago

http://nal.co/papers/Kalchbrenner_DCNN_ACL14 http://nlp.stanford.edu/~socherr/EMNLP2013_RNTN.pdf http://www-nlp.stanford.edu/pubs/SocherLinNgManning_ICML2011.pdf

hughperkins commented 8 years ago

Thanks!

wbernoudy commented 8 years ago

+1. Has there been any progress with this?

hughperkins commented 8 years ago

Hmmmm .... well.... clnn contains a wrapper for 1-d convolutions. https://github.com/hughperkins/clnn/blob/master/TemporalConvolution2.lua I confess I'm unlikely to dedicate any time to implementing this in DeepCL in the short-term. I dont imagine it's tons of work, as long as you:

hughperkins commented 8 years ago

Note: I think an appropriate way forward for this might be to migrate to use https://github.com/BVLC/caffe/issues/4155 , so that any kernels are shared across OpenCL projects.

dex1990 commented 7 years ago

hi,@hughperkins did DeepCL support 3D square convolutional layers ? e.g. 3x3x64, which means size of filter is width 3,height 3 and depth 64.

hughperkins commented 7 years ago

Correct. Can you confirm what makes you feel this might not be the case?

On 15 November 2016 10:35:01 GMT+00:00, dex1990 notifications@github.com wrote:

hi,@hughperkins did DeepCL support 3D square convolutional layers ? e.g. 3x3x64, which means size of filter is width 3,height 3 and depth 64.

You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/hughperkins/DeepCL/issues/37#issuecomment-260606541

Sent from my Android device with K-9 Mail. Please excuse my brevity.

dex1990 commented 7 years ago

Thank you for your answer. I have not found any example on it, maybe i missed some relevant examples. I have trained model from this project: https://github.com/huangzehao/caffe-vdsr some layers of this network have input size: 40x40x64 and 64 filters with size: 3x3x64, so the output size is 40x40x64. I want to test the trained network with DeepCL.

0StackOverflow0 commented 7 years ago

I'm interested in adding 3D convolutional filters (once I do some more reading), but I'm hoping to have a proposal for stride in the not too distant future.

I wonder how hard 1D would be after doing that.

hughperkins commented 7 years ago

I'm hoping to have a proposal for stride in the not too distant future.

Sounds good :)

I wonder how hard 1D would be after doing that.

Its not conceptually hard, but it might involve a certain amount of legwork :)