aa1eb21d82804500e2357cde21b18bcf6f87825a,spotlight/factorization/implicit.py,ImplicitFactorizationModel,predict,#ImplicitFactorizationModel#,245
Before Change
self._check_input(user_ids, item_ids)
user_ids = torch.from_numpy(user_ids.reshape(-1, 1).astype(np.int64))
item_ids = torch.from_numpy(item_ids.reshape(-1, 1).astype(np.int64))
user_var = Variable(gpu(user_ids, self._use_cuda))
item_var = Variable(gpu(item_ids, self._use_cuda))
out = self._net(user_var, item_var)
After Change
self._check_input(user_ids, item_ids, allow_items_none=True)
self._net.train(False)
user_ids, item_ids = _predict_process_ids(user_ids, item_ids,
self._num_items,
self._use_cuda)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: maciejkula/spotlight
Commit Name: aa1eb21d82804500e2357cde21b18bcf6f87825a
Time: 2017-08-02
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/implicit.py
Class Name: ImplicitFactorizationModel
Method Name: predict
Project Name: maciejkula/spotlight
Commit Name: aa1eb21d82804500e2357cde21b18bcf6f87825a
Time: 2017-08-02
Author: maciej.kula@gmail.com
File Name: spotlight/factorization/explicit.py
Class Name: ExplicitFactorizationModel
Method Name: predict
Project Name: eriklindernoren/PyTorch-GAN
Commit Name: fc9e5824ad7bd3094f5012dc6fc3d2348481a2f4
Time: 2019-04-02
Author: eriklindernoren@live.se
File Name: implementations/bicyclegan/bicyclegan.py
Class Name:
Method Name: sample_images