mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
Deployed b914866 with MkDocs version: 1.0.4
This commit is contained in:
@@ -925,8 +925,9 @@ from torchvision.datasets import MNIST
|
||||
class CoolModel(ptl.LightningModule):
|
||||
|
||||
def __init(self):
|
||||
super(CoolModel, self).__init__()
|
||||
# not the best model...
|
||||
self.l1 = torch.nn.Linear(28*28, 10)
|
||||
self.l1 = torch.nn.Linear(28 * 28, 10)
|
||||
|
||||
def forward(self, x):
|
||||
return torch.relu(self.l1(x))
|
||||
@@ -961,7 +962,7 @@ class CoolModel(ptl.LightningModule):
|
||||
|
||||
@ptl.data_loader
|
||||
def test_dataloader(self):
|
||||
return DataLoader(MNIST('path/to/save', train=False), batch_size=32)
|
||||
return DataLoader(MNIST('path/to/save', train=False), batch_size=32)
|
||||
</code></pre>
|
||||
|
||||
<hr />
|
||||
|
||||
+2
-2
@@ -661,8 +661,8 @@
|
||||
<ol>
|
||||
<li><a href="/LightningModule/RequiredTrainerInterface/">Define a LightningModule</a> </li>
|
||||
<li>Pick a trainer <ul>
|
||||
<li><a href="https://github.com/williamFalcon/pytorch-lightning/blob/master/examples/new_project_templates/trainer_cpu_template.py">Basic CPU Trainer</a> </li>
|
||||
<li><a href="https://github.com/williamFalcon/pytorch-lightning/blob/master/examples/new_project_templates/trainer_gpu_cluster_template.py">GPU cluster Trainer</a></li>
|
||||
<li><a href="https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/examples/new_project_templates/single_cpu_template.py">Basic CPU Trainer</a> </li>
|
||||
<li><a href="https://github.com/williamFalcon/pytorch-lightning/blob/master/pytorch_lightning/examples/new_project_templates/multi_node_cluster_template.py">GPU cluster Trainer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Reference in New Issue
Block a user