<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tam5917</author_name>
  <author_url>https://blog.hatena.ne.jp/tam5917/</author_url>
  <blog_title>備忘録</blog_title>
  <blog_url>https://tam5917.hatenablog.com/</blog_url>
  <categories>
    <anon>深層学習</anon>
    <anon>距離学習</anon>
  </categories>
  <description>深層距離学習の一つであるAdaCosはとても有効である。 PyTorch実装も利用できる。 github.com ところがこの実装には（2021/04/24時点）、使い方を間違えるとNaNが頻発する不具合がある。 forward関数内でscaleをadaptiveに更新しているのだが、学習データのみ更新の対象としてほしいところ、検証データの上でそのまま動かすと（forward関数を必然的に通すため）スケールが更新され続けてしまう。結果としてscaleが発散する現象が起きる。 この問題点は以下のissueで指摘されており、修正案も示されている。 github.com この修正案を適用することで、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftam5917.hatenablog.com%2Fentry%2F2021%2F04%2F24%2F195330&quot; title=&quot;AdaCosのPyTorch実装にまつわるバグ - 備忘録&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-04-24 19:53:30</published>
  <title>AdaCosのPyTorch実装にまつわるバグ</title>
  <type>rich</type>
  <url>https://tam5917.hatenablog.com/entry/2021/04/24/195330</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
