Closed saddamhijazi closed 2 years ago
@saddamhijazi , I ran the code shared and face a different error, please find the gist here and share all dependencies to replicate the issue or share a colab gist with the reported error.
Also please try to test your code in latest tf v2.7 and let us know if the issue still persists.Thanks!
@saddamhijazi , I ran the code shared and face a different error, please find the gist here and share all dependencies to replicate the issue or share a colab gist with the reported error.
Sorry for the error, I forgot to include this line
pi = tf.constant(m.pi)
Now the code runs in a normal way without error, I don't know if the problem is caused by the tensorflow version on my laptop. May I ask you if it is possible to install the latest version using anaconda ?
In the following repository the latest available version is 2.6 not 2.7
@saddamhijazi , Installation issues within the Anaconda environment are tracked in the Anaconda repo.Thanks!
I have managed to run the code without problems on TensorFlow 2.7 but it still does not work on 2.4, for me it is not a problem I can use the 2.7 version. The issue could be closed.
Thank you very much.
@saddamhijazi , There is a high possibility that issue was fixed with later TF versions.Glad the suggestion worked for you.Please feel feel to move this issue to closed status as issue got resolved in latest stable version.Thanks!
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.
System information
I am trying to build a keras model to solve a problem in which I define a custom loss function, the model has tanh activation functions and in the custom loss function I generate random input values and then I do some manipulations to prepare the input of the model that takes 3 inputs and outputs just one output. The loss function is then defined as a function of the output and some of its derivatives with respect to the inputs which are computed using tf.gradients.
The code is shown below
I tried to run the code on my PC using the CPU and I got the following error
However, the code worked when I ran it on a GPU machine, and also the code works when I run it on my PC changing only the activation functions to sigmoid ones. I find the behavior not normal, do you have any idea on what has caused that and how to fix the issue.