Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move example inputs to correct device when tracing module (#4360)
* use move_data_to_device instead of to; docstring also allow tuple of Tensor; not supported log error when example_inputs is a dict; commented docstring trace example * Use isinstance to check if example_inputs is a Mapping, instead of type Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com> * import Mapping for isinstance check * multi-line docstring code to test TorchScript trace() * Fix PEP8 f-string is missing placeholders * minor code style improvements * Use (possibly user overwritten) transfer_batch_to_device instead of move_data_to_device Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> * fixed weird comment about trace() log error * Remove unused import Co-authored-by: Jeff Yang <ydcjeff@outlook.com> * Remove logger warning about dict not example_inputs not supported by trace Co-authored-by: stef-ubuntu <stef@webempath.com> Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: Rohit Gupta <rohitgr1998@gmail.com> Co-authored-by: Jeff Yang <ydcjeff@outlook.com>
- Loading branch information