<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>amakazeryu</author_name>
  <author_url>https://blog.hatena.ne.jp/amakazeryu/</author_url>
  <blog_title>とある大学生の勉強メモ</blog_title>
  <blog_url>https://amakazeryu.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>推論を行ったとき結果がnullとなるケースが多々ある． 今回PreTrainedのresnetをonnx exportし，onnx runtimeで推論すると結果が返るが， pytorchで学習を進めたモデルをexportした場合，推論結果がnullとなった際の備忘録． 結論 画像を配列にしたとき正規化を行えば推論結果が返るようになった． input_image = cv2.imread(file_path)/255 序論 推論時はモデルの入出力の型に注意しなくてはいけない． 今回画像をTensorFloat配列に変換しモデルに入力する． UWPにonnxモデルを取り込むとcode gener…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Famakazeryu.hatenablog.com%2Fentry%2F2022%2F01%2F15%2F115918&quot; title=&quot;学習したモデルの推論結果がnullになる　MaskRCNN(Pytorch)，onnxruntime - とある大学生の勉強メモ&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>https://cdn-ak.f.st-hatena.com/images/fotolife/a/amakazeryu/20220115/20220115115359.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-01-15 11:59:18</published>
  <title>学習したモデルの推論結果がnullになる　MaskRCNN(Pytorch)，onnxruntime</title>
  <type>rich</type>
  <url>https://amakazeryu.hatenablog.com/entry/2022/01/15/115918</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
