parameters: (ctx, grad_outputs, grad_scale)
return_statement: return grad_inputs, None, None, None, None
docstring: Implements straight through estimation with clipping. For -amax <= input <= amax
          the gradient passes straight through, otherwise the gradient is zero.
  
          Args:
              ctx: A Context object with saved tensors from forward.
              grad_outputs: A tensor of gradient of outputs.
              grad_scale: A tensor of gradient of scale.
  
          Returns:
              grad_inputs: A tensor of gradient.
docstring_summary: Implements straight through estimation with clipping. For -amax <= input <= amax
          the gradient passes straight through, otherwise the gradient is zero.
docstring_tokens: Implements straight through estimation with clipping . For - amax < = input < = amax the gradient passes straight through otherwise the gradient is zero .
function: def backward(ctx, grad_outputs, grad_scale):
          """
          Implements straight through estimation with clipping. For -amax <= input <= amax
          the gradient passes straight through, otherwise the gradient is zero.
  
          Args:
              ctx: A Context object with saved tensors from forward.
              grad_outputs: A tensor of gradient of outputs.
              grad_scale: A tensor of gradient of scale.
  
          Returns:
              grad_inputs: A tensor of gradient.
          """
          inputs, amax = ctx.saved_tensors
          zero = grad_outputs.new_zeros(1) # create a zero tensor with the same type and device
          grad_inputs = torch.where(inputs.abs() <= amax, grad_outputs, zero)
          return grad_inputs, None, None, None, None
function_tokens: def backward ( ctx , grad_outputs , grad_scale ) : inputs , amax = ctx . saved_tensors zero = grad_outputs . new_zeros ( 1 ) # create a zero tensor with the same type and device grad_inputs = torch . where ( inputs . abs ( ) <= amax , grad_outputs , zero ) return grad_inputs , None , None , None , None