Skip to content

Commit

Permalink
Need to logger.debug or it would be too noisy when loading in a Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Sep 19, 2024
1 parent 3064b33 commit 74e827f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stanza/models/lemma_classifier/lstm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def __init__(self, model_args, output_dim, pt_embedding, label_decoder, upos_to_
if self.num_heads > 0:
self.input_size = utils.round_up_to_multiple(self.input_size, self.num_heads)
self.multihead_attn = nn.MultiheadAttention(embed_dim=self.input_size, num_heads=self.num_heads, batch_first=True).to(device)
logger.info(f"Using attention mechanism with embed dim {self.input_size} and {self.num_heads} attention heads.")
logger.debug(f"Using attention mechanism with embed dim {self.input_size} and {self.num_heads} attention heads.")
else:
self.lstm = nn.LSTM(self.input_size,
self.hidden_dim,
batch_first=True,
bidirectional=True)
logger.info(f"Using LSTM mechanism.")
logger.debug(f"Using LSTM mechanism.")

mlp_input_size = self.hidden_dim * 2 if self.num_heads == 0 else self.input_size
self.mlp = nn.Sequential(
Expand Down

0 comments on commit 74e827f

Please sign in to comment.