class_docstr: Class for evaluating the performance of mapping W
class_docstr_tok: ["Class","for","evaluating","the","performance","of","mapping","W"]
docstr: Maps source embedding with the help of learnt mapping W.
  It also normalizes the embeddings to make it easy for similarity measurements.
docstr_tok: ["Maps","source","embedding","with","the","help","of","learnt","mapping","W.","It","also","normalizes","the","embeddings","to","make","it","easy","for","similarity","measurements","."]
code: def prepare_emb(self):
      """
      Maps source embedding with the help of learnt mapping W.
      It also normalizes the embeddings to make it easy for similarity measurements.
      """
      with tf.variable_scope("PrepEmb", reuse=tf.AUTO_REUSE):
          self.src_ten = tf.cast(
              tf.convert_to_tensor(self.src_ten), tf.float32
          )
          self.tgt_ten = tf.cast(
              tf.convert_to_tensor(self.tgt_ten), tf.float32
          )
          # Mapping
          self.src_ten = tf.matmul(self.src_ten, self.W)
          # Normalization
          self.src_ten = tf.nn.l2_normalize(self.src_ten, axis=1)
          self.tgt_ten = tf.nn.l2_normalize(self.tgt_ten, axis=1)
  
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 3 for calling the Evaluate obj's underlying member method code with example usage: obj.prepare_emb() without return types