Giter Club home page Giter Club logo

Comments (6)

NEGU93 avatar NEGU93 commented on May 30, 2024 2

I will leave this issue open but according to the discussion on tensorflow I believe it's an issue the have with tf.math.angle and the gradients. I encourage you to participate on the discussion or create a new issue. From my part I am still trying to understand the problem.

from cvnn.

NEGU93 avatar NEGU93 commented on May 30, 2024

Dear @jonasdaugalas ,

Thank you for your interest in my library.
What you are experiencing is indeed very puzzling.

I tried many things to know what was happening.
One interesting thing to note is that when changing tf.math.angle of your loss to, for example, tf.math.abs the error stops.
This seems to point out it's actually an incompatibility between the tf angle function and the gradient.
Would it be a tf bug?

Here the changes I did.

from cvnn.

NEGU93 avatar NEGU93 commented on May 30, 2024

So now I replicated your problem but using solely tensorflow's library in here. I posted it here to see what happens.

from cvnn.

NEGU93 avatar NEGU93 commented on May 30, 2024

So I don't fully understand it yet but I have that:

  1. The problem is only with 0+i0 values and no other from the complex domain.
  2. To cite a response in Tensorflow forum:

What I can gather is that nan numpy values for gradients are acceptable when those gradients are differentials of zero values, and this shouldn't cause an issue when actual complex numbers are inserted.

Although I do not yet understand why.

from cvnn.

NEGU93 avatar NEGU93 commented on May 30, 2024

This might be helpful to solve this issue.

from cvnn.

ooshyun avatar ooshyun commented on May 30, 2024

I got a same problem in my model. Thanks for sharing this discussion.

However, how's about if when we get the complex number 0+0j, then add the smallest number in imaginray part inducing the differentiate to 0? As previous discussion, if complex number is a+bj, then the differentiate equation atan(b/a) goes to 0. This seems like avoiding log / divide calculation to inf. Or can I ask about solutions for avoiding the differentiate tf.math.angle from nan?

from cvnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.