Skip to content

Commit

Permalink
fix from_config
Browse files Browse the repository at this point in the history
  • Loading branch information
king-menin committed Jan 19, 2019
1 parent 731d39b commit e452d21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/layers/decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,15 +661,15 @@ def create(cls, label_size, input_dim, input_dropout=0.5, key_dim=64,

class NCRFDecoder(nn.Module):

@property
# TODO: TRY TO FIX THIS SHIT (get attribute error)
# @property WTF!!!
def config(self):
config = {
"name": "NCRFDecoder",
"params": {
"label_size": self.label_size,
"input_dim": self.input_dim,
"input_dropout": self.dropout.p,
"use_cuda": self.use_cuda,
"nbest": self.nbest
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/models/bert_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def config(self):
"name": self.__class__.__name__,
"params": {
"encoder": self.encoder.config,
"decoder": self.decoder.config,
"decoder": self.decoder.config(),
"use_cuda": self.use_cuda
}
}
Expand Down

0 comments on commit e452d21

Please sign in to comment.