facebookresearch / d2go

D2Go is a toolkit for efficient deep learning
Apache License 2.0
826 stars 197 forks source link

allow to skip loading model weights in build_model() #630

Closed stephenyan1231 closed 8 months ago

stephenyan1231 commented 8 months ago

Summary: Currently, in runner build_model() method, when eval_only=True, we always try to load model weights. This is quite restricted in some cases. For example, we may just wanna build a model in eval mode to profile its efficiency, and we have not trained the model or generated the model weights in a checkpoint file.

Thus, this diff adds an argument skip_model_weights to allow users to skip the loading of model weights. Note, this diff is entirely back-compatible and is NOT expected to break existing implementations.

Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request was exported from Phabricator. Differential Revision: D50623772

facebook-github-bot commented 8 months ago

This pull request has been merged in facebookresearch/d2go@f2a0c52c23166fac6e03decc5a5863619773479b.