Framework Ops vs Raw Ops
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ả
In Python TensorFlow, there are some OPs defined in the Python Layer, and some defined in the C-api layer. I have been tasked to see how Java TensorFlow might want to handle this.
I have run some experiments with creating a FrameworkOperatorProcessor class in tensorflow-flow-generator and a couple of architectures present themselves. This class is basically a copy of OperatorProcessor with some tweaks.
The approaches seem to dictate generating a new class in tensorflow-framework, that I named FOps for now.
-
The first approach is to have
FOpssubclassorg.tensorflow.op.Ops, that is generated intensorflow-core-api.However, this leads to potential problems with name clashes with the methods and groups already inOps. A prime example of this are the NN classes we added for Nn and NnRaw (SoftmaxCrossEntropyWithLogits<T> softmaxCrossEntropyWithLogits()has the same signature in both generated classes.) This option requires changing Ops from afinalclass to non-final so that it can be inherited. -
A second approach is to use the delegate pattern, and have FOps hold an internal reference to Ops, and you could call methods on each as required. For example,
FOps ftf = FOps.create(graph);
ftf.math.tensordot(); // framework op
ftf.getOps().math.mul(); // raw op
-
Keep both totally separate from each other. This may potentially allow reuse of the existing
OperatorProcessor. It may be more cumbersome to the programmer user. -
Another option, that I haven't thought of yet.
I welcome thoughts on this.
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 bằng cách đọc OperatorProcessor hiện có trong tensorflow-flow-generator và so sánh nó với FrameworkOperatorProcessor được đề xuất. Xem xét các lớp Ops, Nn và NnRaw được tạo trong tensorflow-core-api và tensorflow-framework. Công việc được xem là hoàn tất khi đã chọn và ghi lại một phương án để expose các operation của framework và raw trong Java.
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, tensorflow
- Lĩnh vực
- backend-api-design
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100