code: def squash(x, epsilon=1e-9, name=None):
      norm = tf.reduce_sum(tf.square(x), axis=-1, keep_dims=True)
      scale = norm / (1.0 + norm) / tf.sqrt(norm + epsilon)
      return tf.multiply(x, scale, name=name)
  
file_path: tensornets/tensornets/capsulenets.py
imports: from __future__ import absolute_import
  import numpy
  import tensorflow
  from .layers import batch_norm
  from .layers import conv2d
  from .layers import convrelu
  from .ops import *
  from .utils import ops_to_outputs
  from .utils import set_args
  from .utils import var_scope
label_desc: Use image node_id 2 for calling a global function with example usage: squash(x, epsilon, name) and returns: tf