From c4ac7f9d856c55d0be8d0661ae924c66df0a2b23 Mon Sep 17 00:00:00 2001 From: coco <69197635+cocoshe@users.noreply.github.com> Date: Tue, 5 Dec 2023 10:04:10 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Hackathon=205th=20No.35=E3=80=91?= =?UTF-8?q?=E4=B8=BA=20Paddle=20=E6=96=B0=E5=A2=9E=20histogramdd=20API?= =?UTF-8?q?=EF=BC=88update=EF=BC=89=20(#753)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add copysign rfc * fix input args, add backward kernel, fix python api * fix types * fix Number types * add pdist api design * fix typo * fix * add bitwise_shift rfc * update * add bitwise rfc * update * update jax shift doc * add histogramdd rfc * add some detail * add test path, fix args desc * modify params in api: sample to x, range to rangs. --- rfcs/APIs/20231001_api_design_for_histogramdd.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rfcs/APIs/20231001_api_design_for_histogramdd.md b/rfcs/APIs/20231001_api_design_for_histogramdd.md index 29507448e..ea37a8248 100644 --- a/rfcs/APIs/20231001_api_design_for_histogramdd.md +++ b/rfcs/APIs/20231001_api_design_for_histogramdd.md @@ -381,13 +381,14 @@ PyTorch底层用cpp实现kernel,Numpy通过API在Python层直接实现。 API的设计为: -- paddle.histogramdd(sample, bins, range=None, density=False, weights=None,name=None) +- paddle.histogramdd(x, bins, ranges=None, density=False, weights=None,name=None) 其中 -+ sample(Tensor) - 输入的多维 tensor ++ x(Tensor) - 输入的多维 tensor + bins(Tensor[], int[], int) 若为`Tensor[]`,则定义了bin的边缘序列;若为`int[]`,则每个值分别定义了每个维度的等宽bin的数量;若为`int`,则定义了所有维度的等宽bin的数量。 -+ range(*sequence of python:float*):规定了bin的最左端和最右端,也就是范围。若为None则以所有输入的最小值和最大值作为边界。 ++ ranges(*sequence of python:float*):规定了bin的最左端和最右端,也就是范围。若为None则以所有输入的最小值和最大值作为边界。 + + density (bool) – 默认为 False , 结果将包含每个bin中的计数。如果设置为 True ,则每个计数(重量)将除以总计数,然后除以其所在bin的范围宽度。 + weight(Tensor): 默认所有输入权重为1,他的shape必须与输入sample除去最内部维度的shape相同,例如当sample的shape为[M,N]时,weight的shape必须为[M]。 + name(str, 可选)- 操作的名称(默认值为None)。