Giter Club home page Giter Club logo

Comments (11)

akoryagin avatar akoryagin commented on June 11, 2024

Hey, @SumantSoni !

Thanks for the interest! It looks like you use tensorflow 2.x, which isn't supported in pydens. Installing, say, tensorflow 1.15 should be enough to solve the problem.

Best,
Alex

from pydens.

sumantkrsoni avatar sumantkrsoni commented on June 11, 2024

from pydens.

akoryagin avatar akoryagin commented on June 11, 2024

Hello again!

Have you tried to uninstall tensorflow 2.0 before installing tensorflow 1.15?
The commands would be

pip uninstall protobuf
pip uninstall tensorflow

As for the second part of the question, regarding collocation method: to my understanding, the essence of the method is to nullify differential equation in a certain set of points. The closest thing in pydens would be to generate points for training using only collocation points, rather than the whole domain.

For instance, you can easily make a sampler that randomly chooses batches of points from collocation set of [0, 0.25, 0.5, 1] in the following manner:

collocation_points = np.array([0, 0.25, 0.5, 1])
s = NumpySampler('choice', a=collocation_points) 

Best,
Alex

from pydens.

sumantkrsoni avatar sumantkrsoni commented on June 11, 2024

Dear Alex,
Nice to see your reply. It helped me a lot to figure out my doubts but still I have one doubt.
How are the coordinates values are implementing in the derivative terms.

Suppose, grad( u(x,y) ) has appeared in loss function and then a single point (x1,y1, t1) from collocation has been replaced in place of ( x,y) of u. but what about grad of u.

how are we dealing with grad of u.
I am confused for implementing the collocation point in place of unknown fn u(x,y) and also differentiation of unknown valued fn u(x,y).

Kindly figure it out for me.

and Thanks a lot for your clarification.

Sumant

from pydens.

joshdey avatar joshdey commented on June 11, 2024

Hi all,

I'm using tf 1.15.0 but still getting the error: OperatorNotAllowedInGraphError: iterating over tf.Tensor is not allowed in Graph execution. Use Eager execution or decorate this function with @tf.function. Do you know of any possible reasons why that might be the case?

Best,
Josh

from pydens.

SergeyTsimfer avatar SergeyTsimfer commented on June 11, 2024

Hello

The reason behind this type of error is the eager execution of TF. Disable it by using disable_eager_execution method and you should be good to go!

Sergey

from pydens.

joshdey avatar joshdey commented on June 11, 2024

Hi @SergeyTsimfer,

Thanks for getting back so quickly! Sorry I'm still a little confused, isn't the error message telling us to use eager execution? Either way, have tried using the disable_eager_execution method both in the notebook I'm working in and inside letters.py inside the pydens folder. Am I thinking about this the wrong way? Thank you so much!

Josh

from pydens.

SergeyTsimfer avatar SergeyTsimfer commented on June 11, 2024

Can you share the code you are trying to run? or you can provide the link to your colab notebook

Sergey

from pydens.

joshdey avatar joshdey commented on June 11, 2024

Here is the link to the Colab notebook: https://colab.research.google.com/drive/1SSaRsCpn01-yTf2twFGyVXUZlZelG-x4?usp=sharing

Josh

from pydens.

SergeyTsimfer avatar SergeyTsimfer commented on June 11, 2024

I was able to reproduce the error on my side: it is actually caused by the 1.15 version, and on 1.14 everything runs fine.

I deployed a fix for the 1.15 version: it allows to run all the notebooks from top to bottom. It is available to you in fix_tf branch #26 , and I am discussing merge to the main branch with my colleagues right now (so you can just use pip install).

Thanks for catching a bug!

Update: merged

Sergey

from pydens.

joshdey avatar joshdey commented on June 11, 2024

Hi Sergey,

Thank you so much for the help!

Best,
Josh

from pydens.

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.