def sign(x):
with tf.get_default_graph().gradient_override_map({"<STR_LIT>": "<STR_LIT>"}):<EOL><INDENT>return tf.sign(x, name='<STR_LIT>')<EOL><DEDENT>
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.

    Examples
    --------
    >>> net = tl.layers.DenseLayer(net, 100, act=lambda x : tl.act.lrelu(x, 0.2), name='dense')

    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