<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>HTN20190109</author_name>
  <author_url>https://blog.hatena.ne.jp/HTN20190109/</author_url>
  <blog_title>HTN20190109の日記</blog_title>
  <blog_url>https://htn20190109.hatenablog.com/</blog_url>
  <categories>
    <anon>DL</anon>
  </categories>
  <description>BertForQuestionAnswering は Hugging Face Transformers のモデルで、入力された 質問とから回答箇所の開始位置と終了位置を予測します 1. 質問＋文脈をBERTへ入力2. 各トークンについて「回答開始点」を予測3. 各トークンについて「回答終了点」を予測4. 開始位置と終了位置から回答文字列を切り出す from transformers import BertTokenizer, BertForQuestionAnsweringimport torch # モデルとトークナイザーmodel_name = &quot;bert-large-uncased-w…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhtn20190109.hatenablog.com%2Fentry%2F2026%2F12%2F06%2F162715&quot; title=&quot; BertForQuestionAnswering - HTN20190109の日記&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>2026-12-06 16:27:15</published>
  <title> BertForQuestionAnswering</title>
  <type>rich</type>
  <url>https://htn20190109.hatenablog.com/entry/2026/12/06/162715</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
