clementfarabet / torch-ios

Torch7 for iOS.
Other
196 stars 42 forks source link

Can't load nn.SpatialAveragePooling #11

Open ericrincon opened 9 years ago

ericrincon commented 9 years ago

The SpatialAveragePooling.lua file doesn't seem to be in the nn folder but the SpatialLPPooling.lua is. SpatialLPPooling.lua requires SpatialAveragePooling.lua.

soumith commented 9 years ago

You'd have to copy over the following files from https://github.com/torch/nn into 3rdparty/nn

https://github.com/torch/nn/blob/master/SpatialAveragePooling.lua https://github.com/torch/nn/blob/master/generic/SpatialAveragePooling.c

Then add these lines to their corresponding equivalent files: https://github.com/torch/nn/blob/master/init.c#L101 https://github.com/torch/nn/blob/master/init.c#L167 https://github.com/torch/nn/blob/master/init.c#L208 https://github.com/torch/nn/blob/master/init.lua#L81

If you send in a Pull request after adding this stuff, I'll happily accept.

codevui commented 8 years ago

I added: SpatialAveragePooling.c --> 3rdparty/nn/generic/ SpatialAveragePooling.lua --> 3rdparty/nn/ Update: 3rdparty/nn/dok/index.dok Update init.c, Update init.lua (update THNN.h) and built sucess, but still can not use SpatialAveragePooling. Did I miss something ?