class_docstr: Quantizer using the DoReFa scheme, as defined in:
  Zhou et al., DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients
  (https://arxiv.org/abs/1606.06160)
code: def quantize(self, input_ri, q_bits):
      scale = pow(2, q_bits) - 1
      output = torch.round(input_ri * scale) / scale
      return output
  
imports: import logging
  import copy
  import torch
  from schema import Schema, And, Or, Optional
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Quantizer, QuantGrad, QuantType
label_desc: Use image node_id 4 for calling the DoReFaQuantizer obj's underlying member method code with example usage: obj.quantize(input_ri, q_bits) and returns: output