class_docstr: Main network which does cross-lingual embeddings training
docstr: Applies procrustes to W matrix for better mapping
  Arguments:
      sess(tf.session): Tensorflow Session
      final_pairs(ndarray): Array of pairs which are mutual neighbors
docstr_tok: ["Applies","procrustes","to","W","matrix","for","better","mapping","Arguments",":","sess","(","tf.session",")",":","Tensorflow","Session","final_pairs","(","ndarray",")",":","Array","of","pairs","which","are","mutual","neighbors"]
code: def apply_procrustes(self, sess, final_pairs):
      """
      Applies procrustes to W matrix for better mapping
      Arguments:
          sess(tf.session): Tensorflow Session
          final_pairs(ndarray): Array of pairs which are mutual neighbors
      """
      print(
          "Applying solution of Procrustes problem to get better mapping..."
      )
      proc_dict = {
          self.generator.src_ph: final_pairs[:, 0],
          self.generator.tgt_ph: final_pairs[:, 1],
      }
      A, B = sess.run(
          [self.generator.src_emb, self.generator.tgt_emb],
          feed_dict=proc_dict,
      )
      # pylint: disable=no-member
      R = scipy.linalg.orthogonal_procrustes(A, B)
      sess.run(tf.assign(self.generator.W, R[0]))
  
imports: from __future__ import print_function, division
  import io
  import os
  import time
  import numpy
  import scipy
  import tensorflow
label_desc: Use image node_id 10 for calling the WordTranslator obj's underlying member method code with example usage: obj.apply_procrustes(sess, final_pairs) without return types