class_docstr: Implements the Memory module.
  
  Based on Neural Turing Machines: arXiv:1410.5401 [cs.NE]
class_docstr_tok: ["Implements","the","Memory","module",".","Based","on","Neural","Turing","Machines",":","arXiv:1410.5401","[","cs.NE","]"]
docstr: Compute the safe norm.
docstr_tok: ["Compute","the","safe","norm","."]
code: def _norm(self, x):
      """Compute the safe norm."""
      return tf.sqrt(
          tf.reduce_sum(tf.square(x), keepdims=True, axis=-1) + 1e-7
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.layers import common_layers
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the TransformerMemory obj's underlying member method code with example usage: obj._norm(x) and returns: tf