aa1eb21d82804500e2357cde21b18bcf6f87825a,spotlight/factorization/explicit.py,ExplicitFactorizationModel,predict,#ExplicitFactorizationModel#Any#Any#,224
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: 4
Instances
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: 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: OpenNMT/OpenNMT-py
Commit Name: b87368e1e7fd832b505db9cc08015ac7af8f95de
Time: 2016-12-23
Author: jvanamersfoort@twitter.com
File Name: VAE/main.py
Class Name:
Method Name: train