Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for _conv_add_relu_grad (0.14 sec)

  1. tensorflow/compiler/mlir/tfr/examples/mnist/ops_defs.py

      elif act == 'RELU6':
        return tf.raw_ops.Relu6(features=res)
      elif act == 'TANH':
        return tf.raw_ops.Tanh(x=res)
      else:
        return res
    
    
    @tf.RegisterGradient('NewConv2D')
    def _conv_add_relu_grad(op: ops.Operation, grad):
      act = op.get_attr('act')
      y = op.outputs[0]
      if act == 'RELU':
        grad = gen_nn_ops.relu_grad(grad, y)
      elif act == 'RELU6':
        grad = gen_nn_ops.relu6_grad(grad, y)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 31 20:23:51 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top