Fixed some errors in layer_factory and cudnn_pooling
Merge pull request #1186 from ashafaei/error-fixes

Fixed some errors in layer_factory and cudnn_pooling