Skip to content

PBDL model for 物理感知神经网络流固耦合计算加速方法研究-王兆坤 #1137

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cloud2009
Copy link

PR types

New Features

PR changes

Others.
Add an example about PBDL model used in '物理感知神经网络流固耦合计算加速方法研究'

Describe

This is the physics-based deep learning model to predict body force used in immerse boundary method. It can accelerate the traditional LBM calculation by this rapid predicted body force.

Copy link

paddle-bot bot commented Apr 9, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

Choose a reason for hiding this comment

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



def main(OUTPUT_DIR):

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change

Comment on lines +164 to +177
for i, (x1_batch, x2_batch, y_batch) in enumerate(train_loader):
x1_batch, x2_batch, y_batch = (
x1_batch.to(device),
x2_batch.to(device),
y_batch.to(device),
)
break
for i, (x1_test, x2_test, y_test) in enumerate(test_loader):
x1_test, x2_test, y_test = (
x1_test.to(device),
x2_test.to(device),
y_test.to(device),
)
break
Copy link
Collaborator

Choose a reason for hiding this comment

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

这两段for循环的作用是?

np.linalg.norm(test_prediction - test_target)
/ np.linalg.norm(test_target)
)
with open(f"{OUTPUT_DIR}/TestingLoss_L2.dat", "a") as file2:
Copy link
Collaborator

Choose a reason for hiding this comment

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

文件路径请使用os.path.join来拼接

Copy link
Collaborator

Choose a reason for hiding this comment

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

输出的日志不用上传

Copy link
Collaborator

Choose a reason for hiding this comment

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

输出的日志不用上传

Copy link
Collaborator

Choose a reason for hiding this comment

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

请转换成.pdparams格式的文件

Copy link
Collaborator

Choose a reason for hiding this comment

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

输出的日志不用上传

Copy link
Collaborator

Choose a reason for hiding this comment

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

输出的日志不用上传

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. 这个文件和checkpoint.pth有什么区别,如果是重复的文件,可以删除,否则请转换成.pdparams格式的文件

@HydrogenSulfate
Copy link
Collaborator

@cloud2009 另外请参考:https://paddlescience-docs.readthedocs.io/zh-cn/latest/zh/development/#3,补充案例文档

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants