Michael Klachko
2017-07-24 23:56:00 UTC
I'm trying the new grouped convolutions feature in the latest Theano
version, so I ran a simple convnet with CIFAR-10: 32x32 RGB input images
(batch size = 128), and the first convolutional layer has 9 feature maps. I
want to have 3 feature maps per color, so if I understand it correctly, I
should use num_groups=3 argument in conv2d op.
Again: I want the first conv. layer to process input images with 3 filters
per color, so that each color channel is connected to 3 feature maps.
Filters are 8x8 with stride 8 (non-overlapping) so the output feature maps
should be 4x4 pixels.
After adding the num_groups arg I got the following error:
ValueError: images and kernel must have the same stack size
Apply node that caused the error: GpuDnnConv{algo='time_on_shape_change',
inplace=True, num_groups=3}(GpuContiguous.0, GpuContiguous.0, GpuAllocEmpty{
dtype='float32', context_name=None}.0, GpuDnnConvDesc{border_mode='valid',
subsample=(8, 8), dilation=(1, 1), conv_mode='conv', precision='float32'}.0,
Constant{1.0}, Constant{0.0})
Toposort index: 62
Inputs types: [GpuArrayType<None>(float32, 4D), GpuArrayType<None>(float32,
4D), GpuArrayType<None>(float32, 4D), <theano.gof.type.CDataType object at
0x7fa3900bc910>, Scalar(float32), Scalar(float32)]
Inputs shapes: [(128, 3, 32, 32), (9, 3, 8, 8), (128, 9, 4, 4), 'No shapes',
(), ()]
Inputs strides: [(12288, 4096, 128, 4), (768, 256, 32, 4), (576, 64, 16, 4), 'No
strides', (), ()]
Inputs values: ['not shown', 'not shown', 'not shown', <capsule object NULL
at 0x7fa372027f30>, 1.0, 0.0]
Outputs clients: [[GpuElemwise{Add}[(0, 0)]<gpuarray>(GpuDnnConv{algo=
'time_on_shape_change', inplace=True, num_groups=3}.0, InplaceGpuDimShuffle{
x,0,x,x}.0)]]
Thanks,
Michael
version, so I ran a simple convnet with CIFAR-10: 32x32 RGB input images
(batch size = 128), and the first convolutional layer has 9 feature maps. I
want to have 3 feature maps per color, so if I understand it correctly, I
should use num_groups=3 argument in conv2d op.
Again: I want the first conv. layer to process input images with 3 filters
per color, so that each color channel is connected to 3 feature maps.
Filters are 8x8 with stride 8 (non-overlapping) so the output feature maps
should be 4x4 pixels.
After adding the num_groups arg I got the following error:
ValueError: images and kernel must have the same stack size
Apply node that caused the error: GpuDnnConv{algo='time_on_shape_change',
inplace=True, num_groups=3}(GpuContiguous.0, GpuContiguous.0, GpuAllocEmpty{
dtype='float32', context_name=None}.0, GpuDnnConvDesc{border_mode='valid',
subsample=(8, 8), dilation=(1, 1), conv_mode='conv', precision='float32'}.0,
Constant{1.0}, Constant{0.0})
Toposort index: 62
Inputs types: [GpuArrayType<None>(float32, 4D), GpuArrayType<None>(float32,
4D), GpuArrayType<None>(float32, 4D), <theano.gof.type.CDataType object at
0x7fa3900bc910>, Scalar(float32), Scalar(float32)]
Inputs shapes: [(128, 3, 32, 32), (9, 3, 8, 8), (128, 9, 4, 4), 'No shapes',
(), ()]
Inputs strides: [(12288, 4096, 128, 4), (768, 256, 32, 4), (576, 64, 16, 4), 'No
strides', (), ()]
Inputs values: ['not shown', 'not shown', 'not shown', <capsule object NULL
at 0x7fa372027f30>, 1.0, 0.0]
Outputs clients: [[GpuElemwise{Add}[(0, 0)]<gpuarray>(GpuDnnConv{algo=
'time_on_shape_change', inplace=True, num_groups=3}.0, InplaceGpuDimShuffle{
x,0,x,x}.0)]]
Thanks,
Michael
--
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
---
You received this message because you are subscribed to the Google Groups "theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to theano-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.