<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kento1109</author_name>
  <author_url>https://blog.hatena.ne.jp/kento1109/</author_url>
  <blog_title>機械学習・自然言語処理の勉強メモ</blog_title>
  <blog_url>https://kento1109.hatenablog.com/</blog_url>
  <categories>
    <anon>PyTorch</anon>
    <anon>メモ</anon>
  </categories>
  <description>やりたいこと 事前にWord2Vecなどで学習した分散表現をネットワークの重みとして用いる。結論としては、Embedding層の重みにテンソル型に変換した分散表現行列をセットするだけで良かった。備忘録としてコードを残しておく。 （ここでは、Googleの学習済みの分散表現ベクトルを用いた。） これのハンドリングが良く分からったので、いったんgensimで読み込んだ。 import torch import torch.nn as nn import numpy as np import gensim model_dir = './GoogleNews-vectors-negative300.b…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkento1109.hatenablog.com%2Fentry%2F2018%2F03%2F15%2F153652&quot; title=&quot;Pytorch：Embeddingに学習済みの重みを使う - 機械学習・自然言語処理の勉強メモ&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>2018-03-15 15:36:52</published>
  <title>Pytorch：Embeddingに学習済みの重みを使う</title>
  <type>rich</type>
  <url>https://kento1109.hatenablog.com/entry/2018/03/15/153652</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
