tensorflow: Group convolutions UnimplementedError for nightly build
I am getting the following error message while running the following code using the nightly version of tensorflow 1.14.1-dev20190524. When will this feature be available?
Code:
weights = tf.ones([3,3,1,3])
X = tf.ones([3,1024,1024,3])
Y = tf.nn.conv2d(X, weights, [1, 1, 1, 1], "VALID")
Error: UnimplementedError: Generic conv implementation does not support grouped convolutions for now. [[node Conv2D_4 (defined at <ipython-input-13-3298cb87493e>:4) ]]
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (15 by maintainers)
I have a pending PR for that, should be submitted soon, although currently it has few unresolved TODOs that are needed to get to top performance.
Anyone who is facing the same issue even after using tf version
2.6.0rc1, you need to pass the batch size of exactly 1. If you pass more than 1, then it won’t work on CPU.Grouped convolutions are currently only supported on GPUs, not CPUs. You are using a grouped convolution because the input channel dimension of 3 (
X.shape[3]) does not match the filter in-depth dimension of 1 (weights.shape[2]). @chsigg, any idea when support is coming for CPUs?Also the error message is a bit unclear. I’ll fix the error message.