Division, exp, log, tile (and potentially more operations) do not support dtype complex64
See original GitHub issueTensorFlow.js version
Via Script Tag
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"> </script>
Browser version
Any (I am using Chrome version 78.0.3904.108).
Describe the problem or feature request
CPU implementations of division, exp, log, tile (and potentially more operations) do not support dtype complex64. Might also be the case on the Web GPU backend.
Code to reproduce the bug / link to feature request
let a = tf.complex(tf.tensor([4,6,8]), tf.tensor([1,2,3]));
tf.div(a,a).print();
tf.exp(a).print();
tf.log(a).print();
tf.tile(a, [3]).print();
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
jax/lax_numpy.py at main · google/jax - GitHub
Implements the NumPy API, using the primitives in :mod:`jax.lax`. NumPy operations are implemented in Python in terms of the primitive operations.
Read more >Chapter 4. NumPy Basics: Arrays and Vectorized Computation
For most data analysis applications, the main areas of functionality I'll focus on are: Fast vectorized array operations for data munging and cleaning, ......
Read more >Supported NumPy features - Numba
NumPy dtypes provide type information useful when compiling, and the regular, structured storage of potentially large amounts of data in memory provides an ......
Read more >Source code for jax._src.numpy.lax_numpy - JAX documentation
Since NumPy operations are not primitive and instead are implemented in terms ... else float64 complex_ = complex64 if dtypes.complex_ == np.complex64 else ......
Read more >python - numba does not accept numpy arrays with dtype=object
Numba in nopython mode (as of version 0.43.1) does not support object arrays. The correct way to type an object array would be:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, I have a real world problem about this issue. For a project in physics modeling I am using complex numbers and must use functions such as sqrt and div, but these do not seem to be implemented as of yet. For this specific project I must use the JS version of tensorflow and have no choice over the programming language.
Hi @nsthorat. I discovered the problem playing around with some complex number computations for a little side project, so this is not for a real world problem. Perhaps the issue should be marked as a feature request? Anyhow, I would consider the problem of low priority.