tensorflow / tensorflow/java

Tensor.tensorOf methods can return unzeroed memory

オープン
#271 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
928
フォーク
227
PR マージ指標
30日以内にマージされた PR はありません

説明

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yep
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 0.3.1

Describe the current behavior

Tensor.of(Class,Shape,long) and Tensor.of(Class,Shape) return a Tensor which has not been zeroed. This is used by the various tensorOf methods on things like TFloat32.

Describe the expected behavior

Tensors should be initialised to be all zero the same way any other Java object is.

Code to reproduce the issue

Run TFloat32.tensorOf(Shape.of(2,2)) and you'll likely get some junk in there. I was allocating things (16,10) but the size is irrelevant.

I was building a one hot vector to use as the target for a training run, and I expected to get an all zero tensor back, so I only set the 1s. The model was very confused by the true labels having NaNs in.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Tensor.of(Class, Shape, long) と Tensor.of(Class, Shape) から始め、次に TFloat32.tensorOf(Shape.of(2,2)) を使用して問題を再現します。新しく作成されたテンソルが、関連する tensorOf メソッドを通じて作成されたテンソルも含め、ゼロのみを含むことを確認し、周辺のコードに回帰チェックが用意されている場合は、それを追加または実行します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
machine-learning
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。