EmbeddingBag
- class torch.ao.nn.qat.modules.embedding_ops.EmbeddingBag(num_embeddings, embedding_dim, max_norm=None, norm_type=2.0, scale_grad_by_freq=False, mode, , , , , , ,
An embedding bag module attached with FakeQuantize modules for weight, used for quantization aware training.
We adopt the same interface as torch.nn.EmbeddingBag, please see https://pytorch.org/docs/stable/generated/torch.nn.EmbeddingBag.html#torch.nn.EmbeddingBag for documentation.
Similar to torch.nn.EmbeddingBag, with FakeQuantize modules initialized to default.
weight (torch.Tensor) – fake quant module for weight
Create a qat module from a float module
Args: mod a float module, either produced by torch.ao.quantization utilities or directly from user