Skip to content

Commit

Permalink
fix bugs in parameter initialization in RMTPP
Browse files Browse the repository at this point in the history
  • Loading branch information
alilevy committed May 8, 2024
1 parent 7b7659a commit 5ab9bcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions easy_tpp/model/torch_model/torch_rmtpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def __init__(self, model_config):

self.layer_hidden = nn.Linear(self.hidden_size, self.num_event_types)

self.factor_intensity_base = torch.empty([1, 1, self.num_event_types], device=self.device)
self.factor_intensity_current_influence = torch.empty([1, 1, self.num_event_types], device=self.device)
self.factor_intensity_base = torch.nn.Parameter(torch.empty([1, 1, self.num_event_types], device=self.device))
self.factor_intensity_current_influence = torch.nn.Parameter(torch.empty([1, 1, self.num_event_types], device=self.device))

nn.init.xavier_normal_(self.factor_intensity_base)
nn.init.xavier_normal_(self.factor_intensity_current_influence)
Expand Down

0 comments on commit 5ab9bcf

Please sign in to comment.