评价此页

get_block_size#

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

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

参数
  • input_shape (tuple[int, ...]) – The input tensor shape possibly more than 2 dimensions

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

返回类型

tuple[int, …]