7a82079d10379287ba4e6e42e21b5b3ce8f541bc,spotlight/sequence/implicit.py,ImplicitSequenceModel,fit,#ImplicitSequenceModel#Any#Any#,100
Before Change
self._num_items,
batch_sequence.size(),
random_state=self._random_state)
negative_var = Variable(
gpu(torch.from_numpy(negative_items), self._use_cuda)
)
negative_prediction = self._net(user_representation,
negative_var)
self._optimizer.zero_grad()
loss = loss_fnc(positive_prediction,
After Change
loss_fnc = pointwise_loss
elif self._loss == "bpr":
loss_fnc = bpr_loss
elif self._loss == "hinge":
loss_fnc = hinge_loss
else:
loss_fnc = adaptive_hinge_loss
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
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
Project Name: maciejkula/spotlight
Commit Name: b0d50f3cccf54888ed59292f3213bea9b2f15dcf
Time: 2017-07-31
Author: ethanrosenthal@gmail.com
File Name: spotlight/factorization/explicit.py
Class Name: ExplicitFactorizationModel
Method Name: fit
Project Name: maciejkula/spotlight
Commit Name: b0d50f3cccf54888ed59292f3213bea9b2f15dcf
Time: 2017-07-31
Author: ethanrosenthal@gmail.com
File Name: spotlight/factorization/implicit.py
Class Name: ImplicitFactorizationModel
Method Name: fit