<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>johshisha</author_name>
  <author_url>https://blog.hatena.ne.jp/johshisha/</author_url>
  <blog_title>johshisha’s diary</blog_title>
  <blog_url>https://johshisha.hatenablog.com/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>chainer</anon>
    <anon>機械学習</anon>
  </categories>
  <description>概要 chainerのmodel(Chainクラス)を入れ子にして使っていたら重みが更新されなかった． Chainクラスで重みの更新がされるのは self.init_scope()内に書いている linkオブジェクトだけだったことが判明し， with self.init_scope():以下に書くとちゃんと更新された． 状況 version chainer==3.0.0 やりたかったこと あるmodelAに layerNを追加して，新たに modelBを作成したかった． だめなコード 計算グラフを出力すると，ちゃんとmodelA -&gt; layerN という風に接続されていたので，これでうまく接…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjohshisha.hatenablog.com%2Fentry%2F2017%2F10%2F25%2F061434&quot; title=&quot;chainerでモデルを入れ子にしたら重みが更新されなかった話 - johshisha’s diary&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>2017-10-25 06:14:34</published>
  <title>chainerでモデルを入れ子にしたら重みが更新されなかった話</title>
  <type>rich</type>
  <url>https://johshisha.hatenablog.com/entry/2017/10/25/061434</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
