Tensor.tensorOf methods can return unzeroed memory
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 928
- Fork
- 227
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với Tensor.of(Class, Shape, long) và Tensor.of(Class, Shape), sau đó tái hiện vấn đề bằng TFloat32.tensorOf(Shape.of(2,2)). Xác nhận rằng các tensor mới được tạo chỉ chứa các số 0, bao gồm cả các tensor được tạo thông qua những phương thức tensorOf liên quan, và thêm hoặc chạy một kiểm tra hồi quy nếu mã xung quanh có cung cấp kiểm tra này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- machine-learning
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 45/100