Framework Ops vs Raw Ops
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 928
- Fork
- 227
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia leggendo l’OperatorProcessor esistente in tensorflow-flow-generator e confrontalo con il FrameworkOperatorProcessor proposto. Esamina le classi Ops, Nn e NnRaw generate in tensorflow-core-api e tensorflow-framework. Il lavoro è completato quando è stato selezionato e documentato un approccio per esporre le operazioni di framework e raw in Java.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, tensorflow
- Ambito
- backend-api-design
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100