fde2f66676f960782c993f7148927c4a4197ab10,spotlight/factorization/explicit.py,ExplicitFactorizationModel,fit,#ExplicitFactorizationModel#,85

Before Change



        for epoch_num in range(self._n_iter):

            users, items, ratings = shuffle(*(interactions.row,
                                              interactions.col,
                                              interactions.data))

            user_ids_tensor = gpu(torch.from_numpy(users),
                                  self._use_cuda)

After Change


                predictions = self._net(user_var, item_var)

                if self._loss == "poisson":
                    predictions = torch.exp(predictions)

                self._optimizer.zero_grad()

                loss = loss_fnc(ratings_var, predictions)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: maciejkula/spotlight
Commit Name: fde2f66676f960782c993f7148927c4a4197ab10
Time: 2017-06-27
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/explicit.py
Class Name: ExplicitFactorizationModel
Method Name: fit


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 58a0dc3b890ad16bbcbee4725bec531f168053dc
Time: 2018-02-11
Author: max.lapan@gmail.com
File Name: ch15/01_train_a2c.py
Class Name:
Method Name:


Project Name: mittagessen/kraken
Commit Name: 90092a23db57abba13808dbf96100e07fc4797ac
Time: 2018-05-14
Author: mittagessen@l.unchti.me
File Name: kraken/lib/ctc.py
Class Name: _CTC
Method Name: backward