only wrap model with TracingAdapter when necessary
Summary: D31134064 changes the default ExportMethod from `DefaultTorchscriptExport` to `D2 (https://github.com/facebookresearch/d2go/commit/7992f91324aee6ae59795063a007c6837e60cdb8)TorchscriptTracingExport` for all models. Without change, all models will be wrapped using `TracingAdapter`, which might cause unexpected effects (eg. it's not scripting friendly). This diff add check for input/output data structure and only wrap the model when necessary. Reviewed By: zhanghang1989 Differential Revision: D31136261 fbshipit-source-id: 4a8ffc986a5c5d61c493dd4ba0eb185aa0d54f38
Showing
Please register or sign in to comment