code: def guided_relu():
      
      from tensorflow.python.ops import gen_nn_ops   # noqa
  
      @tf.RegisterGradient("GuidedReLU")
      def GuidedReluGrad(op, grad):
          return tf.where(0. < grad,
                          gen_nn_ops._relu_grad(grad, op.outputs[0]),
                          tf.zeros(grad.get_shape()))
  
      g = tf.get_default_graph()
      with g.gradient_override_map({'Relu': 'GuidedReLU'}):
          yield
docs: Returns:
          A context where the gradient of :meth:`tf.nn.relu` is replaced by
          guided back-propagation, as described in the paper:
          `Striving for Simplicity: The All Convolutional Net
          <https://arxiv.org/abs/1412.6806>`_