class_docstr: Class for evaluating the performance of mapping W
class_docstr_tok: ["Class","for","evaluating","the","performance","of","mapping","W"]
code: def __init__(
      self,
      W,
      src_vec,
      tgt_vec,
      src_dico,
      tgt_dico,
      src_lang,
      tgt_lang,
      eval_path,
      vocab_size,
  ):
      self.W = W
      self.src_ten = src_vec
      self.tgt_ten = tgt_vec
      self.src_dico = src_dico
      self.tgt_dico = tgt_dico
      self.src_lang = src_lang
      self.tgt_lang = tgt_lang
      self.eval_path = eval_path
      self.vocab_size = vocab_size
      self.best_cos_score = -1e9
      self.drop_lr = False
      self.second_drop = False
      self.save_model = False
      self.max_dict_size = 15000
  
      # Lookup ids
      self.tgt_ids = [x for x in range(self.vocab_size)]
  
      # Placeholders
      self.src_ph = tf.placeholder(
          tf.int32, shape=[None], name="EvalSrcPh"
      )
      self.tgt_ph = tf.placeholder(
          tf.int32, shape=[None], name="EvalTgtPh"
      )
      self.score_ph = tf.placeholder(
          tf.float32, shape=[None, self.vocab_size], name="ScorePh"
      )
  
      # Preprocessing for evaluation
      self.load_eval_dataset()
      self.prepare_emb()
  
      # Graph for evaluation
      self.eval_nn = self.build_eval_graph(
          "NNEval", self.src_ten, self.tgt_ten, en_mean=False
      )
      self.csls_subgraphs = self.build_csls_subgraphs()
  
file_path: nlp-architect/examples/crosslingembs/evaluate.py
imports: from __future__ import print_function, division
  import numpy
  import tensorflow
  from nlp_architect.data.fasttext_emb import get_eval_data
label_desc: Use image node_id 1 to create a new Evaluate object  with example: obj = Evaluate(W, src_vec, tgt_vec, src_dico, tgt_dico, src_lang, tgt_lang, eval_path, vocab_size)