Skip to content

[SWE-Paddle] Add task PaddlePaddle__Paddle_74439 - #1458

Open
Echo-Nie wants to merge 5 commits into
PaddlePaddle:masterfrom
Echo-Nie:74439
Open

[SWE-Paddle] Add task PaddlePaddle__Paddle_74439#1458
Echo-Nie wants to merge 5 commits into
PaddlePaddle:masterfrom
Echo-Nie:74439

Conversation

@Echo-Nie

Copy link
Copy Markdown
Contributor

关联

说明

  • 新增 SWE-Paddle 任务 PaddlePaddle__Paddle-74439

@sunzhongkai588

验证结果

状态 Existing flatten P2P ravel behavior F2P Public export F2P
Base + tests/test.patch PASS FAIL,符合预期 FAIL,符合预期
Base + test patch + solution/code.patch PASS PASS PASS

Base:

P2P: 1 passed
F2P: 2 failed, 1 passed

Solution:

P2P: PASS
F2P: PASS
Full target test: 3 passed in 1.80s
tests/test.sh: 3 passed in 0.51s


Paddle 目前缺少 `ravel` 接口。需要新增 `paddle.ravel(input)`,将输入 Tensor 的所有维度展平成一维,元素顺序和数据类型保持不变。

同时还需要支持标量、普通 Tensor 和 `0-size Tensor`。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

普通 tensor 是啥

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本意其实是想和0-szie做一个区分...

- 返回结果应为一维 Tensor,元素顺序和数据类型与输入一致
- 标量输入的结果 shape 应为 `[1]`
- `0-size Tensor` 应返回 shape 为 `[0]` 的结果
- 现有 `paddle.flatten` 的行为保持不变

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle.flatten 感觉在描述里好突兀,是不是去掉比较合适?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants