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

update bmn dygraph to paddle 2.0 #4858

Open
wants to merge 8 commits into
base: dev-static
Choose a base branch
from

Conversation

huangjun12
Copy link
Contributor

update bmn dygraph to paddle 2.0

args.save_dir) + "bmn_results_test.json")

place = paddle.CUDAPlace(0)
paddle.disable_static(place)
Copy link
Member

Choose a reason for hiding this comment

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

already switch on in the framework

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

".pdparams"), "Given weight dir {} not exist.".format(args.weights)

logger.info('load test weights from {}'.format(args.weights))
model_dict, _ = paddle.load(args.weights)
Copy link
Member

Choose a reason for hiding this comment

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

need load model and opt separately now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done


end_time=$(date +%s)
cost_time=$[ $end_time-$start_time ]
echo "4 card bs=16 9 epoch training time is $(($cost_time/60))min $(($cost_time%60))s"
Copy link
Member

Choose a reason for hiding this comment

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

hard code

elif not args.use_data_parallel:
place = fluid.CUDAPlace(0)
place = paddle.CUDAPlace(0)
Copy link
Member

Choose a reason for hiding this comment

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

double-check this when use cpu

os.makedirs(args.save_dir)
place = paddle.CUDAPlace(dist.ParallelEnv().dev_id)

paddle.disable_static(place)
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@shippingwang shippingwang self-requested a review November 9, 2020 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants