update docstrings and random cleanups (#387)

* fixing docstrings and small nits; up to fileds

* finished adding and fixing docstrings
This commit is contained in:
evonneng authored and GitHub committed 2022-09-10 23:09:44 -07:00
1 parent bd5967461d
commit d50c71ac43
52 files changed
+846 -646

No files matched your search

+7 -3
View File
@@ -28,8 +28,8 @@ class Embedding(FieldModule):
# TODO: add different types of initializations
Args:
in_dim (int): Number of embeddings
out_dim (int): Dimension of the embedding vectors
in_dim: Number of embeddings
out_dim: Dimension of the embedding vectors
"""
def __init__(self, in_dim: int, out_dim: int) -> None:
@@ -42,5 +42,9 @@ class Embedding(FieldModule):
self.embedding = torch.nn.Embedding(self.in_dim, self.out_dim)
def forward(self, in_tensor: TensorType[..., "input_dim"]) -> TensorType[..., "output_dim"]:
"""Call forward"""
"""Call forward
Args:
in_tensor: input tensor to process
"""
return self.embedding(in_tensor)