<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>derwind</author_name>
  <author_url>https://blog.hatena.ne.jp/derwind/</author_url>
  <blog_title>らんだむな記憶</blog_title>
  <blog_url>https://randommemory.hatenablog.com/</blog_url>
  <categories>
    <anon>machine_learning</anon>
  </categories>
  <description>DeZero に勾配クリッピングを実装する場合どうすれば良いのだろう？と思ったので PyTorch の API を見てみる。torch.nn.utils.clip_grad_norm_ — PyTorch 1.10.0 documentation なるほど、loss.backward() 後にクリッピングするのか。https://github.com/pytorch/pytorch/blob/v1.10.0/torch/nn/utils/clip_grad.py#L9-L56 を見ると勾配を持っているパラメータをかき集めている。なるほど。https://github.com/pytorch/p…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frandommemory.hatenablog.com%2Fentry%2F2021%2F11%2F15%2F011754&quot; title=&quot;勾配クリッピング - らんだむな記憶&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-11-15 01:17:54</published>
  <title>勾配クリッピング</title>
  <type>rich</type>
  <url>https://randommemory.hatenablog.com/entry/2021/11/15/011754</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
