class_docstr: Quantized counterpart of nn.Conv2d module. Stores the centroid, the assignments
  and the non-quantized biases. The full weight is re-instantiated at each forward
  pass and autograd automatically computes the gradients with respect to the
  centroids.
  
  Args:
      - centroids: centroids of size n_centroids x block_size
      - assignments: assignments of the centroids to the subvectors
        of size self.out_channels x n_blocks
      - bias: the non-quantized bias, must be either torch.Tensor or None
  
  Remarks:
      - We refer the reader to the official documentation of the nn.Conv2d module
        for the other arguments and the behavior of the module.
      - Performance tests on GPU show that this implementation is 10% slower than
        the non-quantized nn.Conv2d module for a standard training loop.
      - During the backward, the gradients are averaged by cluster and not summed.
        This explains the hook registered to the centroids.
class_docstr_tok: ["Quantized","counterpart","of","nn.Conv2d","module",".","Stores","the","centroid",",","the","assignments","and","the","non-quantized","biases",".","The","full","weight","is","re-instantiated","at","each","forward","pass","and","autograd","automatically","computes","the","gradients","with","respect","to","the","centroids",".","Args",":","-","centroids",":","centroids","of","size","n_centroids","x","block_size","-","assignments",":","assignments","of","the","centroids","to","the","subvectors","of","size","self.out_channels","x","n_blocks","-","bias",":","the","non-quantized","bias",",","must","be","either","torch.Tensor","or","None","Remarks",":","-","We","refer","the","reader","to","the","official","documentation","of","the","nn.Conv2d","module","for","the","other","arguments","and","the","behavior","of","the","module",".","-","Performance","tests","on","GPU","show","that","this","implementation","is","10","%","slower","than","the","non-quantized","nn.Conv2d","module","for","a","standard","training","loop",".","-","During","the","backward",",","the","gradients","are","averaged","by","cluster","and","not","summed",".","This","explains","the","hook","registered","to","the","centroids","."]
code: def forward(self, x):
      return F.conv2d(
          x,
          self.weight,
          self.bias,
          self.stride,
          self.padding,
          self.dilation,
          self.groups,
      )
  
file_path: fairseq/fairseq/modules/quantization/pq/modules/qconv.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn.modules.utils import _pair
label_desc: Use image node_id 3 for calling the PQConv2d obj's underlying member method code with example usage: obj.forward(x) and returns: F