-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
base: dev-static
Are you sure you want to change the base?
Conversation
dygraph/bmn/predict.py
Outdated
args.save_dir) + "bmn_results_test.json") | ||
|
||
place = paddle.CUDAPlace(0) | ||
paddle.disable_static(place) |
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.
already switch on in the framework
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.
Done
dygraph/bmn/predict.py
Outdated
".pdparams"), "Given weight dir {} not exist.".format(args.weights) | ||
|
||
logger.info('load test weights from {}'.format(args.weights)) | ||
model_dict, _ = paddle.load(args.weights) |
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.
need load model and opt separately now
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.
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" |
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.
hard code
dygraph/bmn/train.py
Outdated
elif not args.use_data_parallel: | ||
place = fluid.CUDAPlace(0) | ||
place = paddle.CUDAPlace(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.
double-check this when use cpu
dygraph/bmn/train.py
Outdated
os.makedirs(args.save_dir) | ||
place = paddle.CUDAPlace(dist.ParallelEnv().dev_id) | ||
|
||
paddle.disable_static(place) |
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.
same
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.
Done
|
update bmn dygraph to paddle 2.0