class_docstr: A combination loss of Soft Nearest Neighbor Loss calculated at every layer
  in the network, and standard cross entropy of the logits. Presented in
  "Analyzing and Improving Representations with the Soft Nearest Neighbor Loss"
  by Nicholas Frosst, Nicolas Papernot, and Geoffrey Hinton.
  arXiv preprint arXiv:1902.01889 (2019).
class_docstr_tok: ["A","combination","loss","of","Soft","Nearest","Neighbor","Loss","calculated","at","every","layer","in","the","network",",","and","standard","cross","entropy","of","the","logits",".","Presented","in","''","Analyzing","and","Improving","Representations","with","the","Soft","Nearest","Neighbor","Loss","''","by","Nicholas","Frosst",",","Nicolas","Papernot",",","and","Geoffrey","Hinton",".","arXiv","preprint","arXiv:1902.01889","(","2019",")","."]
docstr: Pairwise Euclidean distance between two matrices.
  :param A: a matrix.
  :param B: a matrix.
  
  :returns: A tensor for the pairwise Euclidean between A and B.
docstr_tok: ["Pairwise","Euclidean","distance","between","two","matrices",".",":","param","A",":","a","matrix",".",":","param","B",":","a","matrix",".",":","returns",":","A","tensor","for","the","pairwise","Euclidean","between","A","and","B","."]
code: def pairwise_euclid_distance(A, B):
      """Pairwise Euclidean distance between two matrices.
      :param A: a matrix.
      :param B: a matrix.
  
      :returns: A tensor for the pairwise Euclidean between A and B.
      """
      batchA = tf.shape(A)[0]
      batchB = tf.shape(B)[0]
  
      sqr_norm_A = tf.reshape(
          tf.reduce_sum(tf.pow(A, 2), 1), [1, batchA]
      )
      sqr_norm_B = tf.reshape(
          tf.reduce_sum(tf.pow(B, 2), 1), [batchB, 1]
      )
      inner_prod = tf.matmul(B, A, transpose_b=True)
  
      tile_1 = tf.tile(sqr_norm_A, [batchB, 1])
      tile_2 = tf.tile(sqr_norm_B, [1, batchA])
      return tile_1 + tile_2 - 2 * inner_prod
  
imports: import copy
  import json
  import os
  import warnings
  import numpy
  import tensorflow
  from cleverhans.attacks import Attack
  from cleverhans.compat import softmax_cross_entropy_with_logits
  from cleverhans.model import Model
  from cleverhans.utils import safe_zip
label_desc: Use image node_id 2 for calling the SNNLCrossEntropy obj's underlying member method code with example usage: obj.pairwise_euclid_distance(A, B) and returns: unknown