class_docstr: Neural Collaborative Filtering (NCF) implementation
  
  :Citation:
  
      He, Xiangnan, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu, and Tat-Seng Chua. "Neural collaborative filtering."
      In Proceedings of the 26th International Conference on World Wide Web, pp. 173-182. International World Wide Web
      Conferences Steering Committee, 2017. Link: https://www.comp.nus.edu.sg/~xiangnan/papers/ncf.pdf
class_docstr_tok: ["Neural","Collaborative","Filtering","(","NCF",")","implementation",":","Citation",":","He",",","Xiangnan",",","Lizi","Liao",",","Hanwang","Zhang",",","Liqiang","Nie",",","Xia","Hu",",","and","Tat-Seng","Chua",".","``","Neural","collaborative","filtering",".","''","In","Proceedings","of","the","26th","International","Conference","on","World","Wide","Web",",","pp",".","173-182.","International","World","Wide","Web","Conferences","Steering","Committee",",","2017",".","Link",":","https",":","\/\/www.comp.nus.edu.sg\/~xiangnan\/papers\/ncf.pdf"]
docstr: Predict function of this trained model
  
  Args:
      user_input (list or element of list): userID or userID list
      item_input (list or element of list): itemID or itemID list
      is_list (bool): if true, the input is list type
          noting that list-wise type prediction is faster than element-wise's.
  
  Returns:
      list or float: A list of predicted rating or predicted rating score.
docstr_tok: ["Predict","function","of","this","trained","model","Args",":","user_input","(","list","or","element","of","list",")",":","userID","or","userID","list","item_input","(","list","or","element","of","list",")",":","itemID","or","itemID","list","is_list","(","bool",")",":","if","true",",","the","input","is","list","type","noting","that","list-wise","type","prediction","is","faster","than","element-wise","'s",".","Returns",":","list","or","float",":","A","list","of","predicted","rating","or","predicted","rating","score","."]
code: def predict(self, user_input, item_input, is_list=False):
      """Predict function of this trained model
  
      Args:
          user_input (list or element of list): userID or userID list
          item_input (list or element of list): itemID or itemID list
          is_list (bool): if true, the input is list type
              noting that list-wise type prediction is faster than element-wise's.
  
      Returns:
          list or float: A list of predicted rating or predicted rating score.
      """
  
      if is_list:
          output = self._predict(user_input, item_input)
          return list(output.reshape(-1))
  
      else:
          output = self._predict(
              np.array([user_input]), np.array([item_input])
          )
          return float(output.reshape(-1)[0])
  
file_path: recommenders/recommenders/models/ncf/ncf_singlenode.py
imports: import os
  import numpy
  import tensorflow
  import tf_slim
  from time import time
  import logging
label_desc: Use image node_id 7 for calling the NCF obj's underlying member method code with example usage: obj.predict(user_input, item_input, is_list) and returns: list, float