question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Division, exp, log, tile (and potentially more operations) do not support dtype complex64

See original GitHub issue

TensorFlow.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:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
MiraiKamicommented, Jun 23, 2021

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.

0reactions
FrederikLynggaardcommented, Feb 12, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found