mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Deployed 09d4475 with MkDocs version: 1.0.4
This commit is contained in:
@@ -546,11 +546,11 @@
|
||||
|
||||
<h1>Checkpointing</h1>
|
||||
|
||||
<p>Lightning can automate saving and loading checkpoints.</p>
|
||||
<p>i Lightning can automate saving and loading checkpoints.</p>
|
||||
<hr />
|
||||
<h3 id="model-saving">Model saving</h3>
|
||||
<p>To enable checkpointing, define the checkpoint callback and give it to the trainer.</p>
|
||||
<pre><code class="python">from pytorch_lightning.utils.pt_callbacks import ModelCheckpoint
|
||||
<pre><code class="python">from pytorch_lightning.callbacks import ModelCheckpoint
|
||||
|
||||
checkpoint_callback = ModelCheckpoint(
|
||||
filepath='/path/to/store/weights.ckpt',
|
||||
|
||||
@@ -627,9 +627,13 @@ trainer = Trainer(enable_early_stop=True)
|
||||
|
||||
<hr />
|
||||
<h4 id="gradient-clipping">Gradient Clipping</h4>
|
||||
<p>Use this to turn off early stopping and run training to the <a href="#force-training-for-min-or-max-epochs">max_epoch</a></p>
|
||||
<p>Gradient clipping may be enabled to avoid exploding gradients.
|
||||
Specifically, this will <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.utils.clip_grad_norm_">clip the gradient norm computed over all model parameters <em>together</em></a>.</p>
|
||||
<pre><code class="python"># DEFAULT (ie: don't clip)
|
||||
trainer = Trainer(gradient_clip=0)
|
||||
|
||||
# clip gradients with norm above 0.5
|
||||
trainer = Trainer(gradient_clip=0.5)
|
||||
</code></pre>
|
||||
|
||||
<hr />
|
||||
|
||||
File diff suppressed because one or more lines are too long
+14
-14
@@ -2,72 +2,72 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
<url>
|
||||
<loc>None</loc>
|
||||
<lastmod>2019-08-07</lastmod>
|
||||
<lastmod>2019-08-09</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
</urlset>
|
||||
Binary file not shown.
Reference in New Issue
Block a user