code: def sign(x):
      """Sign function.
  
      Clip and binarize tensor using the straight through estimator (STE) for the gradient, usually be used for
      quantizing values in `Binarized Neural Networks`: https://arxiv.org/abs/1602.02830.
  
      Parameters
      ----------
      x : Tensor
          input.
  
      Returns
      -------
      Tensor
          A ``Tensor`` in the same type as ``x``.
  
      References
      ----------
      - `Rectifier Nonlinearities Improve Neural Network Acoustic Models, Maas et al. (2013)`
         http://web.stanford.edu/~awni/papers/relu_hybrid_icml2013_final.pdf
  
      - `BinaryNet: Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1, Courbariaux et al. (2016)`
         https://arxiv.org/abs/1602.02830
  
      """
  
      def grad(dy):
          return tf.clip_by_value(dy, -1, 1)
  
      return tf.sign(x, name="sign"), grad
  
file_path: TensorLayer/tensorlayer/activation.py
imports: import tensorflow
  from tensorlayer.decorators import deprecated
label_desc: Use image node_id 6 for calling a global function with example usage: sign(x) and returns: tf,  grad, tf