code: def quantize(x):
      # ref: https://github.com/AngusG/tensorflow-xnor-bnn/blob/master/models/binary_net.py#L70
      #  https://github.com/itayhubara/BinaryNet.tf/blob/master/nnUtils.py
      with tf.compat.v1.get_default_graph().gradient_override_map(
          {"Sign": "TL_Sign_QuantizeGrad"}
      ):
          return tf.sign(x)
  
imports: import numpy
  import tensorflow
  from tensorflow.python.ops.rnn_cell import LSTMStateTuple
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated, deprecated_alias
label_desc: Use image node_id 13 for calling a global function with example usage: quantize(x) and returns: tf