class_docstr: Base class for all the activations.
class_docstr_tok: ["Base","class","for","all","the","activations","."]
code: def _setup(self, dims, contig, dtype):
      # Input
      f_input = (torch.rand(*dims) - 0.5) * 256
      self.scale = 1.0
      self.zero_point = 0
  
      # Quantize the tensor
      q_input = torch.quantize_per_tensor(
          f_input,
          scale=self.scale,
          zero_point=self.zero_point,
          dtype=dtype,
      )
      if not contig:
          # Make non-contiguous
          new_shape = list(range(q_input.ndim))[::-1]
          q_input = q_input.permute(new_shape)
  
      self.inputs = {"q_input": q_input}
  
file_path: pytorch/benchmarks/operator_benchmark/pt/qactivation_test.py
imports: import torch
  import torch.ao.nn.quantized.functional
  import operator_benchmark
label_desc: Use image node_id 1 for calling the QActivationBenchmarkBase obj's underlying member method code with example usage: obj._setup(dims, contig, dtype) without return types