Shortcuts

get_block_size

class torch.ao.quantization.observer.get_block_size(input_shape, granularity)[source][source]

Get the block size based on the input shape and granularity type.

Parameters
  • input_shape (Tuple[int, ...]) – The input tensor shape possibly more than 2 dimensions

  • granularity (Granularity) – The granularity type of the quantization

Return type

Tuple[int, …]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources