Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Regularize handling of dense features (#1447)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1447

Regularize handling of dense features

Differential Revision: D23502163

fbshipit-source-id: e7f4f2d635f87a6390b358d90e4d294042e9a3d5
  • Loading branch information
Michael Gschwind authored and facebook-github-bot committed Sep 3, 2020
1 parent c9b04a5 commit 575b268
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytext/torchscript/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ def __init__(
@torch.jit.script_method
def forward(
self,
dense_feat: List[List[float]],
texts: Optional[List[str]] = None,
# multi_texts is of shape [batch_size, num_columns]
multi_texts: Optional[List[List[str]]] = None,
tokens: Optional[List[List[str]]] = None,
languages: Optional[List[str]] = None,
dense_feat: Optional[List[List[float]]] = None,
):
inputs: ScriptBatchInput = ScriptBatchInput(
texts=resolve_texts(texts, multi_texts),
Expand Down Expand Up @@ -107,13 +107,13 @@ def __init__(
@torch.jit.script_method
def forward(
self,
right_dense_feat: List[List[float]],
left_dense_feat: List[List[float]],
texts: Optional[List[str]] = None,
# multi_texts is of shape [batch_size, num_columns]
multi_texts: Optional[List[List[str]]] = None,
tokens: Optional[List[List[str]]] = None,
languages: Optional[List[str]] = None,
right_dense_feat: Optional[List[List[float]]] = None,
left_dense_feat: Optional[List[List[float]]] = None,
):
inputs: ScriptBatchInput = ScriptBatchInput(
texts=resolve_texts(texts, multi_texts),
Expand Down

0 comments on commit 575b268

Please sign in to comment.