lightning/pytorch_lightning/core
Stef | ステフ 9cfd29946a
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>
2020-10-29 11:16:57 +05:30
..
__init__.py CI: add flake8 (#4239) 2020-10-19 21:20:17 +01:00
datamodule.py Add trainer attribute to datamodule (#3749) 2020-10-01 00:41:19 +05:30
decorators.py added copyright notices (#3062) 2020-08-19 22:03:22 -04:00
grads.py added copyright notices (#3062) 2020-08-19 22:03:22 -04:00
hooks.py [Doc] Fix on_train_batch_end description (#4330) 2020-10-26 20:24:38 +05:30
lightning.py move example inputs to correct device when tracing module (#4360) 2020-10-29 11:16:57 +05:30
memory.py Refactor GPUStatsMonitor to improve training speed (#3257) 2020-09-04 06:02:16 -04:00
saving.py Load checkpoint from Bytes (#4314) 2020-10-23 11:29:13 -04:00
step_result.py Use `Optional` for arguments set to `None` by default (#4164) 2020-10-15 23:02:50 +02:00