We have a ticket at

  

      github.com/tensorflow/tensorflow
  

  
    
  
	  
  

  
    
      Groups parameter of Conv2d and Conv2dTranpose ('deconvolution') not Working ? 12
    

    
      
        opened 
        
          
        
        Nov 27, 2020
      
      


      
        
          
          NguyenThaiHoc1
        
      
    

    
        TF 2.3
        comp:keras
        stat:awaiting tensorflower
        type:bug
    
  


  
    Hello Authors

I'm a user of tensorflow. Someday i have use Deconvolution and …i know it called "Conv2dTranpose" in tensorflow. But I want to reduce parameters of model by groups. I found groups property at Pytorch and I see it in Conv2D class (Conv2dTranspose inheritance Conv2d). But when i use i get result which i don't want 
This is my code 

`
import tensorflow as tf
from tensorflow.keras.layers import Conv2D, Conv2DTranspose, BatchNormalization, ReLU, MaxPool2D
model = tf.keras.Sequential([
    Conv2D(512,
           kernel_size=(3, 3),
           strides=(1, 1),
           padding='same',
           use_bias=False,
           name='conv'),
    BatchNormalization(),
    ReLU(),
    Conv2DTranspose(256, kernel_size=(4, 4), strides=(2, 2),
                    padding='same', use_bias=False,
                    groups=256,
                    kernel_initializer='he_normal'),
    BatchNormalization(),
    ReLU()
])

model.build((32, 256, 192, 3))
model.summary()
`

This is summary when i received 
>
Layer (type)                 Output Shape              Param #   
conv (Conv2D)                (32, 256, 192, 512)       13824     
batch_normalization (BatchNo (32, 256, 192, 512)       2048      
re_lu (ReLU)                 (32, 256, 192, 512)       0         
conv2d_transpose (Conv2DTran (32, 512, 384, 256)       2097152   
batch_normalization_1 (Batch (32, 512, 384, 256)       1024      
re_lu_1 (ReLU)               (32, 512, 384, 256)       0         
Total params: 2,114,048
Trainable params: 2,112,512
Non-trainable params: 1,536

I think conv2d_transpose will: 2097152 / 256(groups) = 8192 params ? 

Sorry for my writer is not good 
Thanks you for reading 
Thai Hoc