Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Hackathon 5th No.57】Neural networks for topology optimization复现 #694

Merged
merged 4 commits into from Nov 2, 2023

Conversation

NKNaN
Copy link
Contributor

@NKNaN NKNaN commented Oct 11, 2023

Add RFC doc.

@paddle-bot
Copy link

paddle-bot bot commented Oct 11, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

[源码链接](https://github.com/ISosnovik/nn4topopt)

### 1.2 目标

Copy link
Collaborator

Choose a reason for hiding this comment

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

标题改为“功能目标”,内容是要实现的功能点,如“使用xx数据集,xx网络,使用数据驱动方法实现简单2D结构的拓扑优化”之类的


## 3. 目标调研

1. 论文解决的问题:
Copy link
Collaborator

Choose a reason for hiding this comment

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

改为markdown格式,### 3.1 解决的问题,下面三点也是


1. 论文解决的问题:
拓扑优化问题: 如何在设计域内分布材料,使获得的结构具有最优性能同时满足一定的约束条件(例如:必须是01解,1-域内有材料,0-域内没有材料)
对于具有连续设计变量的拓扑优化问题,最常用的方法是所谓的SIMP迭代算法,可以看到利用SIMP方法,求解器只需要进行第N_0次迭代就可以得到结构的初步视图。
Copy link
Collaborator

Choose a reason for hiding this comment

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

N_0 改为 $N_{0}$ ,注意两端空格,全文中其他公式或类似变量也是。
另外这边说“可以看到利用SIMP方法,求解器只需要进行第N_0次迭代就可以得到结构的初步视图”,不太清晰,N_0是指第0次迭代吗?还是第一个N次迭代?可以完善一下

论文中的Unet为如图结构,根据已有API需要对 `ppsci.arch.UNetEx` 的结构做调整例如加入 `Dropout` 层和 `Upsampling` 层

2. 初始迭代步数采样器:
```python
Copy link
Collaborator

Choose a reason for hiding this comment

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

不需要在设计文档上写大段代码,如有必要,仅增加少量必要的代码辅助说明,将方案描述清楚即可


验收标准:
- 定性标准:得到与参考代码中<https://github.com/ISosnovik/nn4topopt/blob/master/results.ipynb>中的Binary Accuracy相近的指标图像
- 定量标准:计算与论文table 1与table 2结果的相对误差,不超过10%
Copy link
Collaborator

Choose a reason for hiding this comment

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

可以加上“基于PaddleScience实现”这个标准


## 6. 排期规划

10-01 ~ 10-07日完成复现
Copy link
Collaborator

Choose a reason for hiding this comment

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

需要修改,应当至少包含:前期调研(如论文阅读时间)、Paddle实现(如果有)、PaddleScience实现、产出整理+撰写文档的阶段。
同时修改pr的时间虽然不需要单独排期,但应当也算在项目时间内,可以写成“代码合入:xx.xx-xx.xx”,项目总时长可参考黑客松比赛时长进行制定。


10-01 ~ 10-07日完成复现

## 7. 影响面
Copy link
Collaborator

Choose a reason for hiding this comment

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

指需要合入对代码是否对现有其他模块产生影响,如果没有,可以写“对其他模块无影响”


1. PaddleScience 在 Arch 中已实现 Unet - 论文核心模型
2. 现有框架可以对 Data 进行 transformation 但不包括随机翻转和随机旋转 - 论文数据处理步骤
3. 现有框架文档中对 batched data 进行 transformation 的部分尚未展示 - 论文数据处理步骤
Copy link
Collaborator

Choose a reason for hiding this comment

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

复现过程中如果发现该论文需要某种功能,而PaddleScience不具备,原则上不需要完全补全这种功能,但论文要用的部分需要增加。如发现代码中目前batch_transform/preprecess.py下没有相应的transfrom,需要在这个文件下增加相关内容(仅论文使用种类)或用其他方法规避、替代该功能,并适配现有代码。

@@ -0,0 +1,151 @@
# 【Hackathon 5th No.57】Neural networks for topology optimization
Copy link
Collaborator

Choose a reason for hiding this comment

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

辛苦大佬提交RFC文档,建议全文检查一下:

  1. 数学公式渲染的正确性,注意内联的数学公式两侧的美元符号 $ 均需要空一格(xxx空格$a+b$空格xxx
  2. 文本内标点符号使用英文符号

以保证在github上正常渲染,谢谢~

模版和内容可参考PaddleScience 开发者任务 RFC(Request For Comment) 模板

Copy link
Contributor Author

Choose a reason for hiding this comment

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

感谢大佬指点,已按照意见做了修改。


### 3.1. 论文解决的问题:
拓扑优化问题: 如何在设计域内分布材料,使获得的结构具有最优性能同时满足一定的约束条件(例如:必须是01解,1-域内有材料,0-域内没有材料)
![image](https://github.com/NKNaN/community/assets/49900969/73fc6aeb-83c7-4915-8d37-7c1664e6c694)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这种方式的话,图片还存储在你的个人仓库。现在rfcs/Science目录下新增了一个image的目录来存放图片,需要参照这个更改一下文档中所有显示图片的地方,并在rfcs/Science/images下新建此项目目录来存放图片

Copy link
Contributor Author

Choose a reason for hiding this comment

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

哦哦好的

@lijialin03 lijialin03 merged commit 5bfa0fe into PaddlePaddle:master Nov 2, 2023
1 check passed
@NKNaN NKNaN deleted the ayase/develop3 branch December 13, 2023 05:16
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.

None yet

3 participants