Tensor.tensorOf methods can return unzeroed memory
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
从 Tensor.of(Class, Shape, long) 和 Tensor.of(Class, Shape) 开始,然后使用 TFloat32.tensorOf(Shape.of(2,2)) 重现该问题。确认新创建的张量只包含零,包括通过相关 tensorOf 方法创建的张量;如果周围的代码提供了回归检查,则添加或运行该检查。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Java
- 星标
- 928
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
tensorflow/java#653 · 1 条评论 · 4 个 reaction ·
-
难度 5/5 一周以上 新手友好度 25/100
tensorflow/java#621 · 4 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
tensorflow/java#617 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
tensorflow/java#615 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
tensorflow/java#614 · 1 条评论 ·
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 88/100
checkstyle/test-configs#263 ·
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
1.0.0-alpha2 Type/Improvement
难度 2/5 1-3 小时 新手友好度 68/100
wso2/dpdp-accelerator#272 ·