Skip to content

Commit

Permalink
infer, test=document_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostML committed Aug 30, 2022
1 parent e044b9a commit 2009e48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddlenlp/transformers/transformer/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ class InferTransformerModel(TransformerModel):
Specify beam search version. It should be in one
of [`v1`, `v2`]. If `v2`, need to set `alpha`(default to 0.6) for length
penalty. Default to `v1`.
activation (str, optional):
The activation used in FFN. Defaults to "relu".
kwargs:
The key word arguments can be `rel_len` and `alpha`:
Expand Down Expand Up @@ -896,6 +898,7 @@ def __init__(self,
max_out_len=256,
output_time_major=False,
beam_search_version='v1',
activation="relu",
**kwargs):
args = dict(locals())
args.pop("self")
Expand Down

0 comments on commit 2009e48

Please sign in to comment.