Do you mean something like this?

  

      github.com/keras-team/keras
  

  
    
  
	  
  

  
    
      Feature request: In-plane locally-connected 2D convolutions 6
    

    
      
        opened 
        
          
        
        Mar 29, 2018
      
      

        
          closed 
        
          
        
        Jun 25, 2021
      
        

      
        
          
          tsoernes
        
      
    

    
    
  


  
    I'm requesting a convolution that works on each channel separately using the sam…e filter (as https://www.tensorflow.org/versions/r1.2/api_docs/python/tf/contrib/layers/conv2d_in_plane), and but uses different filters spatially (like LocallyConnected2D).

One approach would be to modify `LocallyConnected2D`:
``` 
individual_channels = tf.split(inputs, inputs.shape[3], -1)
convs = []
for channel in individual_channels:
    conv = K.local_conv2d(channel, self.kernel, self.kernel_size, self.strides,
       (self.output_row, self.output_col), self.data_format)
    convs.append(conv)
outputs = tf.concat(convs, -1)
```
where
```
self.kernel_shape = (output_row * output_col,
    self.kernel_size[0] * self.kernel_size[1], 1)
```
But the above approach is very slow.