class_docstr: Class for evaluating the performance of mapping W
class_docstr_tok: ["Class","for","evaluating","the","performance","of","mapping","W"]
docstr: Calculates the value of CSLS criterion
  Arguments:
      sess(tf.session): Tensorflow session
docstr_tok: ["Calculates","the","value","of","CSLS","criterion","Arguments",":","sess","(","tf.session",")",":","Tensorflow","session"]
code: def calc_csls(self, sess):
      """
      Calculates the value of CSLS criterion
      Arguments:
          sess(tf.session): Tensorflow session
      """
      good_pairs = self.generate_dictionary(sess)
      eval_dict = {
          self.src_ph: good_pairs[0],
          self.tgt_ph: good_pairs[1],
      }
      cos_mean = sess.run(
          self.csls_subgraphs["CSLS_Criteria"], feed_dict=eval_dict
      )
      print("CSLS Score is " + str(cos_mean))
  
      # Drop LR only after the second drop in CSLS
      if cos_mean < self.best_cos_score:
          self.drop_lr = True & self.second_drop
          self.second_drop = True
  
      # Save model whenever cos score is better than saved score
      if cos_mean > self.best_cos_score:
          self.save_model = True
      else:
          self.save_model = False
  
      # Update best cos score
      if cos_mean > self.best_cos_score:
          self.best_cos_score = cos_mean
          self.drop_lr = False
  
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 12 for calling the Evaluate obj's underlying member method code with example usage: obj.calc_csls(sess) without return types