Framework Ops vs Raw Ops
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 928
- Forks
- 227
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den vorhandenen OperatorProcessor in tensorflow-flow-generator zu lesen und ihn mit dem vorgeschlagenen FrameworkOperatorProcessor zu vergleichen. Überprüfe die generierten Klassen Ops, Nn und NnRaw in tensorflow-core-api und tensorflow-framework. Als abgeschlossen gilt, wenn ein Ansatz für die Bereitstellung von Framework- und Raw-Operationen in Java ausgewählt und dokumentiert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, tensorflow
- Bereich
- backend-api-design
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100