-
Notifications
You must be signed in to change notification settings - Fork 184
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
heat exchanger #693
heat exchanger #693
Conversation
Thanks for your contribution! |
"T_h": cfg.TRAIN.weight | ||
* np.ones([left_data["x"].shape[0], 1], dtype="float32") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用np.full_like
代替
"T_h": cfg.TRAIN.weight | ||
* np.ones([right_data["x"].shape[0], 1], dtype="float32") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
==> np.full_like
|
||
Examples: | ||
>>> import ppsci | ||
>>> pde = ppsci.equation.HeatExchanger(1.0,1.0,1.0,1.0,1.0,1.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参数之间用逗号隔开
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参数之间是用逗号隔开的,1.0是一个参数
docs/zh/api/arch.md
Outdated
@@ -20,5 +20,6 @@ | |||
- PrecipNet | |||
- UNetEx | |||
- NowcastNet | |||
- PI_DeepONets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
===> HEDeepONet
NTIME: 20 # number of time steps | ||
NPOINT: 101 # number of points in the domain | ||
NQM: 60 # Number of branch network samples | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
保留一个空行即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
train/eval函数里的超参数直接使用cfg.XXX
访问,不需要重新赋值,减少代码行数
} | ||
|
||
# set constraint | ||
BC_label = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
变量命名统一用小写
}, | ||
ppsci.loss.MSELoss("mean"), | ||
output_expr={ | ||
"T_h": lambda out: out["T_c"] - T_cin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,整合成一行
equation=equation, | ||
geom=geom, | ||
validator=validator, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretrained_model_path: null, checkpoint_path: null、eval_with_no_grad: true这三个配置文件中的参数并没有填写在这里
geom=geom, | ||
validator=validator, | ||
pretrained_model_path=cfg.EVAL.pretrained_model_path, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eval_with_no_grad: true这两个配置文件中的参数并没有填写在这里
ppsci/arch/PI_deeponets_HE.py
Outdated
from ppsci.arch import mlp | ||
|
||
|
||
class PI_DeepONets(base.Arch): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据这个模型的代码,感觉是比较定制化的热交换DeepONet,可以叫HEDeepONet
ppsci/arch/PI_deeponets_HE.py
Outdated
@@ -0,0 +1,197 @@ | |||
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件名一律小写,改为 he_deeponet.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所有文件里的PI_DeepONets
改为HEDeepONets
ppsci/arch/PI_deeponets_HE.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件是不是多余的,可以删除掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* add bubble datafile test=develop * add bubble code test=develop * add bubble code test=develop * add bubble code test=develop * add bubble code * add bubble data * add bubble code * delete mat file * delete mat file * bubble code * delete mat file * add some modify * add some modifications * add some modifications * add some modifications * add some modifications * add some modification * add some modification * add some modification * add some modification * add some modification * add some modification(test=document_fix) * add some modification * add some modification * add some modification * add some modification * add some code test=develop * add some code test=develop * add some code test=develop * add some code test=develop * add some code test=develop * add some code test=develop * add some code test=develop * add some code test=develop
PR types
One of New example
PR changes
heat exchanger APIs
Describe
heat exchanger code