Skip to content

Instantly share code, notes, and snippets.

@ArnoutDevos
Created January 11, 2018 13:23
Show Gist options
  • Save ArnoutDevos/909b3a862d834f31b901c104dde692bc to your computer and use it in GitHub Desktop.
Save ArnoutDevos/909b3a862d834f31b901c104dde692bc to your computer and use it in GitHub Desktop.
@ops.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()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment