triton.language.histogram

triton.language.histogram(input, num_bins)

基于输入张量计算具有num_bins个分箱的直方图,分箱宽度为1且从0开始。

Parameters:
  • input (Tensor) – 输入张量

  • num_bins (int) - 直方图分箱数量

此函数也可以作为成员函数在tensor上调用, 使用x.histogram(...)而非 histogram(x, ...)的形式。