class_docstr: Data loader for the DKN model.
  DKN requires a special type of data format, where each instance contains a label, the candidate news article,
  and user's clicked news article. Articles are represented by title words and title entities. Words and entities
  are aligned.
  
  Iterator will not load the whole data into memory. Instead, it loads data into memory
  per mini-batch, so that large files can be used as input data.
class_docstr_tok: ["Data","loader","for","the","DKN","model",".","DKN","requires","a","special","type","of","data","format",",","where","each","instance","contains","a","label",",","the","candidate","news","article",",","and","user","'s","clicked","news","article",".","Articles","are","represented","by","title","words","and","title","entities",".","Words","and","entities","are","aligned",".","Iterator","will","not","load","the","whole","data","into","memory",".","Instead",",","it","loads","data","into","memory","per","mini-batch",",","so","that","large","files","can","be","used","as","input","data","."]
docstr: Convert data into numpy arrays that are good for further model operation.
  
  Args:
      candidate_news_index_batch (list): the candidate news article's words indices
      candidate_news_entity_index_batch (list): the candidate news article's entities indices
  Returns:
      dict: A dictionary, containing multiple numpy arrays that are convenient for further operation.
docstr_tok: ["Convert","data","into","numpy","arrays","that","are","good","for","further","model","operation",".","Args",":","candidate_news_index_batch","(","list",")",":","the","candidate","news","article","'s","words","indices","candidate_news_entity_index_batch","(","list",")",":","the","candidate","news","article","'s","entities","indices","Returns",":","dict",":","A","dictionary",",","containing","multiple","numpy","arrays","that","are","convenient","for","further","operation","."]
code: def _convert_infer_data(
      self,
      candidate_news_index_batch,
      candidate_news_entity_index_batch,
  ):
      """Convert data into numpy arrays that are good for further model operation.
  
      Args:
          candidate_news_index_batch (list): the candidate news article's words indices
          candidate_news_entity_index_batch (list): the candidate news article's entities indices
      Returns:
          dict: A dictionary, containing multiple numpy arrays that are convenient for further operation.
      """
      res = {}
      res["candidate_news_index_batch"] = np.asarray(
          candidate_news_index_batch, dtype=np.int64
      )
      res["candidate_news_entity_index_batch"] = np.asarray(
          candidate_news_entity_index_batch, dtype=np.int64
      )
      return res
  
file_path: recommenders/recommenders/models/deeprec/io/dkn_iterator.py
imports: import tensorflow
  import numpy
  from recommenders.models.deeprec.io.iterator import BaseIterator
label_desc: Use image node_id 6 for calling the DKNTextIterator obj's underlying member method code with example usage: obj._convert_infer_data(candidate_news_index_batch, candidate_news_entity_index_batch) and returns: res