update teacher to support models where device is a property
Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/416 Distillation assumes teacher model has an attribute "device". Sometimes this attribute is actually a property (e.g., generalizedrcnn) but there is zero guarantee that it exists. We add a helper function to move the model to the device and add this attribute if needed. Reviewed By: chihyaoma Differential Revision: D40283954 fbshipit-source-id: 42921653eac8a79499e22edac29aa6aeac016e8a
Showing
Please register or sign in to comment