class_docstr: DKN model (Deep Knowledge-Aware Network)
  
  :Citation:
  
      H. Wang, F. Zhang, X. Xie and M. Guo, "DKN: Deep Knowledge-Aware Network for News
      Recommendation", in Proceedings of the 2018 World Wide Web Conference on World
      Wide Web, 2018.
class_docstr_tok: ["DKN","model","(","Deep","Knowledge-Aware","Network",")",":","Citation",":","H.","Wang",",","F.","Zhang",",","X.","Xie","and","M.","Guo",",","``","DKN",":","Deep","Knowledge-Aware","Network","for","News","Recommendation","''",",","in","Proceedings","of","the","2018","World","Wide","Web","Conference","on","World","Wide","Web",",","2018","."]
docstr: Load pre-trained embeddings as a constant tensor.
  
  Args:
      file_path (str): the pre-trained embeddings filename.
  
  Returns:
      object: A constant tensor.
docstr_tok: ["Load","pre-trained","embeddings","as","a","constant","tensor",".","Args",":","file_path","(","str",")",":","the","pre-trained","embeddings","filename",".","Returns",":","object",":","A","constant","tensor","."]
code: def _init_embedding(self, file_path):
      """Load pre-trained embeddings as a constant tensor.
  
      Args:
          file_path (str): the pre-trained embeddings filename.
  
      Returns:
          object: A constant tensor.
      """
      return tf.constant(np.load(file_path).astype(np.float32))
  
file_path: recommenders/recommenders/models/deeprec/models/dkn.py
imports: import numpy
  import tensorflow
  from recommenders.models.deeprec.models.base_model import BaseModel
label_desc: Use image node_id 2 for calling the DKN obj's underlying member method code with example usage: obj._init_embedding(file_path) and returns: tf