be426ba9d5f569b5eab685d96bb418d11fbb5474,spotlight/factorization/implicit.py,ImplicitFactorizationModel,_get_negative_prediction,#ImplicitFactorizationModel#,258
Before Change
self._num_items,
len(user_ids),
random_state=self._random_state)
negative_var = Variable(
gpu(torch.from_numpy(negative_items), self._use_cuda)
)
negative_prediction = self._net(user_ids, negative_var)
return negative_prediction
After Change
self._num_items,
len(user_ids),
random_state=self._random_state)
negative_var = gpu(torch.from_numpy(negative_items), self._use_cuda)
negative_prediction = self._net(user_ids, negative_var)
return negative_prediction
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: maciejkula/spotlight
Commit Name: be426ba9d5f569b5eab685d96bb418d11fbb5474
Time: 2018-05-20
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/implicit.py
Class Name: ImplicitFactorizationModel
Method Name: _get_negative_prediction
Project Name: maciejkula/spotlight
Commit Name: be426ba9d5f569b5eab685d96bb418d11fbb5474
Time: 2018-05-20
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/implicit.py
Class Name: ImplicitSequenceModel
Method Name: _get_negative_prediction
Project Name: maciejkula/spotlight
Commit Name: be426ba9d5f569b5eab685d96bb418d11fbb5474
Time: 2018-05-20
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/implicit.py
Class Name: ImplicitSequenceModel
Method Name: predict