7a82079d10379287ba4e6e42e21b5b3ce8f541bc,spotlight/factorization/implicit.py,ImplicitFactorizationModel,fit,#ImplicitFactorizationModel#,102

Before Change


                        self._num_items,
                        len(batch_user),
                        random_state=self._random_state)
                    negative_var = Variable(
                        gpu(torch.from_numpy(negative_items))
                    )
                    negative_prediction = self._net(user_var, negative_var)

                self._optimizer.zero_grad()

                loss = loss_fnc(positive_prediction, negative_prediction)

After Change



                if self._loss == "adaptive_hinge":
                    negative_prediction = [self._get_negative_prediction(user_var)
                                           for _ in range(5)]
                else:
                    negative_prediction = self._get_negative_prediction(user_var)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: maciejkula/spotlight
Commit Name: 7a82079d10379287ba4e6e42e21b5b3ce8f541bc
Time: 2017-07-13
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/implicit.py
Class Name: ImplicitFactorizationModel
Method Name: fit


Project Name: sony/nnabla-examples
Commit Name: 7d8f3f66495979f1bbd27205d422d673991709f2
Time: 2021-01-26
Author: Krishna.Wadhwani@sony.com
File Name: GANs/stylegan2/generate.py
Class Name:
Method Name: main


Project Name: sony/nnabla-examples
Commit Name: 9dab8ae56ce90f1b9ba6808a6e0673ab6f13103e
Time: 2020-12-15
Author: Krishna.Wadhwani@sony.com
File Name: GANs/stylegan2/generate.py
Class Name:
Method Name: main


Project Name: maciejkula/spotlight
Commit Name: 7a82079d10379287ba4e6e42e21b5b3ce8f541bc
Time: 2017-07-13
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/implicit.py
Class Name: ImplicitSequenceModel
Method Name: fit