class_docstr: Fake version of affine quantization
  
  gemmlowp style scale+shift quantization. See more details in
  https://github.com/google/gemmlowp/blob/master/doc/quantization.md.
  
  We DO NOT recommend affine quantization on weights for performance reason. There might be value to affine quantize
  activation as it can be cancelled by bias and comes with no performance penalty. This functionality is only added
  for experimental purpose.
class_docstr_tok: ["Fake","version","of","affine","quantization","gemmlowp","style","scale+shift","quantization",".","See","more","details","in","https",":","\/\/github.com\/google\/gemmlowp\/blob\/master\/doc\/quantization.md",".","We","DO","NOT","recommend","affine","quantization","on","weights","for","performance","reason",".","There","might","be","value","to","affine","quantize","activation","as","it","can","be","cancelled","by","bias","and","comes","with","no","performance","penalty",".","This","functionality","is","only","added","for","experimental","purpose","."]
docstr: Args:
      ctx: Pytorch convention.
      grad_output: A tensor of gradient of outputs
  
  Returns:
      grad_inputs: A tensor of gradient
docstr_tok: ["Args",":","ctx",":","Pytorch","convention",".","grad_output",":","A","tensor","of","gradient","of","outputs","Returns",":","grad_inputs",":","A","tensor","of","gradient"]
code: def backward(ctx, grad_outputs):
      """
      Args:
          ctx: Pytorch convention.
          grad_output: A tensor of gradient of outputs
  
      Returns:
          grad_inputs: A tensor of gradient
      """
  
      inputs, min_range, max_range = ctx.saved_tensors
      zero = grad_outputs.new_zeros(1)
      grad_inputs = torch.where(
          (inputs <= max_range) * (inputs >= min_range),
          grad_outputs,
          zero,
      )
      return grad_inputs, None, None, None
  
imports: import numpy
  import yaml
  import logging
  import torch
  from torch.autograd import Function
label_desc: Use image node_id 2 for calling the FakeAffineTensorQuantFunction obj's underlying member method code with example usage: obj.backward(ctx, grad_outputs) and returns: grad_inputs,  None,  None,  None