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

add c128 checkponit with corresponding config, refine reduce_dropout function in distribtued mode #233

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/pretrained_compound/ChemRL/GEM-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ To reproduce the result from the ogb leaderboard, just run the inference command

sh scripts/inference.sh

## Run inference
To reproduce the result from the ogb leaderboard, you can download the checkponit from [here](https://baidu-nlp.bj.bcebos.com/PaddleHelix/models/molecular_modeling/gem2_l12_c256.pdparams).
Then put it under the local `./model` folder and run the inference command:

sh scripts/inference.sh
We also provide a checkpoint with smaller embedding size(128), you can download it from [here](https://baidu-nlp.bj.bcebos.com/PaddleHelix/models/molecular_modeling/gem2_l12_c128.pdparams) .

Then change the `encoder_config` to `opt3d_l12_c128.json`, `init_model` to `gem2_l12_c128.pdparams` in `inference.sh`.

Now you can run the inference command with the new checkpoint.

## Citing this work

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"node_channel": 128,
"pair_channel": 128,
"triple_channel": 128
}
3 changes: 2 additions & 1 deletion apps/pretrained_compound/ChemRL/GEM-2/train_gem2.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ def _read_json(path):

### build model
model = MolRegressionModel(model_config, encoder_config)
single_model = model
print("parameter size:", calc_parameter_size(model.parameters()))
if args.distributed:
model = paddle.DataParallel(model)
Expand Down Expand Up @@ -308,7 +309,7 @@ def _read_json(path):
ema.register()

if epoch_id == 69:
model.encoder.reduce_dropout()
single_model.encoder.reduce_dropout()

## train
s_time = time.time()
Expand Down