Skip to content

Commit

Permalink
Update base_model.py (PaddlePaddle#4551)
Browse files Browse the repository at this point in the history
* Update base_model.py

* Update base_model.py

---------

Co-authored-by: Sijun He <sijun.he@hotmail.com>
  • Loading branch information
co63oc and sijunhe authored Jan 29, 2023
1 parent 270eb84 commit e48a7cb
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
# limitations under the License.

import abc
import sys

import numpy as np

import paddle
import paddle.nn as nn
Expand All @@ -29,7 +26,7 @@ def __init__(self, pretrained_model, dropout=None, output_emb_size=None):
self.dropout = nn.Dropout(dropout if dropout is not None else 0.1)

# if output_emb_size is not None, then add Linear layer to reduce embedding_size,
# we recommend set output_emb_size = 256 considering the trade-off beteween
# we recommend set output_emb_size = 256 considering the trade-off between
# recall performance and efficiency

self.output_emb_size = output_emb_size
Expand Down Expand Up @@ -92,7 +89,7 @@ def __init__(self, pretrained_model, dropout=None, output_emb_size=None):
self.dropout = nn.Dropout(dropout if dropout is not None else 0.1)

# if output_emb_size is not None, then add Linear layer to reduce embedding_size,
# we recommend set output_emb_size = 256 considering the trade-off beteween
# we recommend set output_emb_size = 256 considering the trade-off between
# recall performance and efficiency

self.output_emb_size = output_emb_size
Expand Down

0 comments on commit e48a7cb

Please sign in to comment.