mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
cleared spaces
This commit is contained in:
@@ -898,15 +898,13 @@ class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
|
||||
|
||||
@data_loader
|
||||
def test_dataloader(self):
|
||||
"""Implement a PyTorch DataLoader.
|
||||
|
||||
:return: PyTorch DataLoader
|
||||
|
||||
If you don't need a test dataset and a test_step, you don't need to implement this method.
|
||||
r"""
|
||||
|
||||
Called by lightning during test loop. Make sure to use the @pl.data_loader decorator,
|
||||
this ensures not calling this function until the data are needed.
|
||||
If you want to change the data during every epoch DON'T use the data_loader decorator.
|
||||
this ensures not calling this function until the data are needed.
|
||||
|
||||
Return:
|
||||
PyTorch DataLoader
|
||||
|
||||
Example
|
||||
-------
|
||||
@@ -925,6 +923,10 @@ class LightningModule(ABC, GradInformation, ModelIO, ModelHooks):
|
||||
|
||||
return loader
|
||||
|
||||
.. note:: If you don't need a test dataset and a test_step, you don't need to implement this method.
|
||||
|
||||
.. note:: If you want to change the data during every epoch DON'T use the data_loader decorator.
|
||||
|
||||
"""
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user