Framework Ops vs Raw Ops
Personne n'a encore pris cette issue.
- Langage dominant
- Java
- Étoiles
- 928
- Forks
- 227
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par lire l’OperatorProcessor existant dans tensorflow-flow-generator et comparez-le au FrameworkOperatorProcessor proposé. Examinez les classes Ops, Nn et NnRaw générées dans tensorflow-core-api et tensorflow-framework. Le travail est terminé lorsqu’une approche pour exposer les opérations de framework et raw en Java a été sélectionnée et documentée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java, tensorflow
- Domaine
- backend-api-design
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100