Embedding
- class torch.ao.nn.quantized.Embedding(num_embeddings, embedding_dim, padding_idx=None, max_norm=None, norm_type=2.0, scale_grad_by_freq=, , ,
A quantized Embedding module with quantized packed weights as inputs. We adopt the same interface as torch.nn.Embedding, please see https://pytorch.org/docs/stable/generated/torch.nn.Embedding.html for documentation.
Similar to Embedding, attributes will be randomly
initialized at module creation time and will be overwritten later
weight (Tensor) – the non-learnable quantized weights of the module of shape .
>>> m = nn.quantized.Embedding(num_embeddings=10, embedding_dim=12)
>>> indices = torch.tensor([9, 6, 5, 7, 8, 8,
Create a quantized embedding module from a float module
mod (Module) – a float module, either produced by torch.ao.quantization utilities or provided by user