Complex Tensor Implementation Missing?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java
- Domain
- machine-learning
Research direction
Start with org.tensorflow.op.dtypes.Complex.java and org.tensorflow.op.DtypesOps.java, then compare the available Java data-type classes with the Complex op signature shown in the report. Check existing Java documentation or examples for complex64 and complex128 usage. Done should either provide supported Java complex types or document the correct way to use the operation.
Written by the indexing model from the issue text.
Description
Hi everybody,
i am just simply trying to create a Complex object, and asking myself it is simply not implemented, because i do not find the Class-Type for complex64 or complex128for the Tout parameter for the "df.dtypes.complex" function. In line 5 i just used TFloat32 to get it compiled.
1 Graph g = new Graph();
2 Ops tf = Ops.create(g);
3 Constant r = tf.constant(Float.valueOf((float)5.0));
4 Constant i = tf.constant(Float.valueOf((float)3.0));
5 Complex c = tf.dtypes.complex(r,i, TFloat32.class);
I understand the problem, in line 5:
Exception in thread "main" org.tensorflow.exceptions.TFInvalidArgumentException: Value for attr 'Tout' of double is not in the list of allowed values: complex64, complex128
; NodeDef: {{node Complex}}; Op<name=Complex; signature=real:T, imag:T -> out:Tout; attr=T:type,default=DT_FLOAT,allowed=[DT_FLOAT, DT_DOUBLE]; attr=Tout:type,default=DT_COMPLEX64,allowed=[DT_COMPLEX64, DT_COMPLEX128]>
at org.tensorflow.internal.c_api.AbstractTF_Status.throwExceptionIfNotOK(AbstractTF_Status.java:87)
at org.tensorflow.GraphOperationBuilder.finish(GraphOperationBuilder.java:461)
at org.tensorflow.GraphOperationBuilder.build(GraphOperationBuilder.java:100)
at org.tensorflow.GraphOperationBuilder.build(GraphOperationBuilder.java:71)
at org.tensorflow.op.dtypes.Complex.create(Complex.java:95)
at org.tensorflow.op.DtypesOps.complex(DtypesOps.java:107)
at TensorflowTest.main(TensorflowTest.java:74)
But i do not find a ComplexDataType like TFLoat32
Can anyone bring light into my deepest darkness? I do not find a documentation or an example how it shall be done in java.
Best Regards
- Dominant language
- Java
- Stars
- 928
- Forks
- 227
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tensorflow/java
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tensorflow/java#653 · 1 comment · 4 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#621 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#617 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
tensorflow/java#615 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
tensorflow/java#614 · 1 comment ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100