Skip to content

Conversation

@ApricityXX
Copy link
Contributor

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

第四批-编号16(共1个)
__getitem__ 方法本应根据传入的 index 返回对应的一个样本或一组数据切片,但当前实现中完全忽略 index 参数,每次都重新生成整个网格空间(共100个点)以及边界条件索引(36个点)。这意味着无论 index 是多少,返回的数据都是完整且相同的结构,导致数据加载逻辑错误,破坏了 Dataset 的迭代机制。
修复后的 __getitem__ 使用 index 来选择具体的输入点(例如 domain 中的某个坐标点),同时保留共享的边界信息(bc_index 和 bc_value)。这样每个样本可以独立访问,符合 Dataset 接口要求。此外,可通过种子控制随机性以保证可复现性。若需更复杂的采样策略,可在初始化时预生成所有样本。

@paddle-bot
Copy link

paddle-bot bot commented Oct 11, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Oct 11, 2025
Copy link
Contributor

@liym27 liym27 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit 5458524 into PaddlePaddle:develop Oct 18, 2025
102 of 105 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants