Skip to content

优化 paddle.cumprod api #73057

@ooooo-create

Description

@ooooo-create

bug描述 Describe the Bug

  1. paddle.cumprod 的 dim 参数拥有默认值 None,但是不传,会报错,想要的一个 int 类型,也许没人这么用,去掉默认值可以
    图片
  2. 查看其他 cum 开头的 api(pytorch都不支持为 None),dim 的默认值 None,会将输入 flatten 成一维度,dim=-1,进行后续计算,并且 np.cumprod 就是 flatten 的行为,给默认值适配一个 flatten 也行
  3. Torch 和 numpy 在 dtype 为 None,处理输入时,如果输入整数精度小于平台的默认整数时,会使用平台默认整数进行计算,[Accuracy diff No.15] Fix accuracy diff for cumprod API #72897 尝试修改,但是 api_brenchmark 感觉很难通过,累乘确实容易溢出,是否考虑支持呢

其他补充信息 Additional Supplementary Information

No response

Metadata

Metadata

Labels

PFCCPaddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfccstatus/new-issue新建type/feature-request新需求申请

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions