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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

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: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/implicit.py
Class Name: ImplicitSequenceModel
Method Name: fit