<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>y-kamiya</author_name>
  <author_url>https://blog.hatena.ne.jp/y-kamiya/</author_url>
  <blog_title>MEMOcho-</blog_title>
  <blog_url>https://jsapachehtml.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>gpuで学習して出力したデータを、cpuでloadしようとしたらタイトルのようなエラーが出た フォーラムで同じ問題が質問されていたので簡単に解決 Unexpected key in state_dict: &quot;bn1.num_batches_tracked&quot; - PyTorch Forums こんな感じでload_state_dictにstrict=Falseを指定するだけ load_state_dict(torch.load(path_to_data, map_location=device_name), strict=False) 余分なキーが含まれていても無視してくれるオプションのよう t…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fjsapachehtml.hatenablog.com%2Fentry%2F2019%2F03%2F02%2F185035&quot; title=&quot;pytorchでエラー(Unexpected key(s) in state_dict: &amp;quot;bn1.num_batches_tracked&amp;quot;) - MEMOcho-&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>2019-03-02 18:50:35</published>
  <title>pytorchでエラー(Unexpected key(s) in state_dict: &quot;bn1.num_batches_tracked&quot;)</title>
  <type>rich</type>
  <url>https://jsapachehtml.hatenablog.com/entry/2019/03/02/185035</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
