Coder Social home page Coder Social logo

Comments (9)

shuheng-liu avatar shuheng-liu commented on August 24, 2024 1

exp(0.5) is just a constant. You can use np.exp or math.exp instead of torch.exp, which only works for pytorch tensors (similar to numpy arrays)

from neurodiffeq.

shuheng-liu avatar shuheng-liu commented on August 24, 2024 1

I haven't heard of the butterfly optimization algorithm. If you really want to try it out, you probably have to implement your own Optimizer. Here is an article.

Can you be a little bit more specific as to "Loss and validation graph"? In general, you can inject behavior, including custom plotting and logging using the callback feature.

from neurodiffeq.

shuheng-liu avatar shuheng-liu commented on August 24, 2024

Hi @SK-Math , you can easily achieve this by implementing your own torch module.

import torch
from neurodiffeq.networks import FCNN

class MyActivation(torch.nn.Module):
    def forward(self, x):
        return torch.cos(1.75 * x) * torch.exp(-x**2 / 2)


fcnn = FCNN(hidden_units=(50, 50), actv=MyActivation)

Let me know if there are further questions.

from neurodiffeq.

SK-Math avatar SK-Math commented on August 24, 2024

Thnka you @shuheng-liu for your quick responce

from neurodiffeq.

SK-Math avatar SK-Math commented on August 24, 2024
def forward(self, x):
        return  x*torch.exp(0.5)

when calling in solver getting error like
TypeError: exp(): argument 'input' (position 1) must be Tensor, not float
how to fix it

from neurodiffeq.

SK-Math avatar SK-Math commented on August 24, 2024

Hi @shuheng-liu
How can I use Butterfly Optimization Algorithm instead of default ADAM optimization?
As I see torch.optim. has not Butterfly Optimization .
How to plot Loss and validation graph during training ?
Thank you

from neurodiffeq.

SK-Math avatar SK-Math commented on August 24, 2024
  1. Hi,
    Can I write ode= 0.5*u''(x) + u'(0.5x) + u(x) like ode= lambda u, t: [ 0.5* diff(u, t, order=2) + diff(u, t/2) + u]
    Just want to confirm writing of this term u'(0.5x)
    please check.

  2. Is neurodiffeq support fractional order diff. eq?

Thank you

from neurodiffeq.

SK-Math avatar SK-Math commented on August 24, 2024

Hi,

  1. Can I write ode= 0.5u''(x) + u'(0.5x) + u(x) like ode= lambda u, t: [ 0.5 diff(u, t, order=2) + diff(u, t/2) + u]
    Just want to confirm writing of this term u'(0.5x)
    please check.

  2. Is neurodiffeq support fractional order diff. eq?

Thank you

from neurodiffeq.

shuheng-liu avatar shuheng-liu commented on August 24, 2024

Hi, the first equation is, by definition, not a differential equation. It is a generic functional equation with differential operators. Hence, NeuroDiffEq cannot be used to solve this equation out of the box. But you can still solve it with neural networks, you just have to write some codes by yourself.

At the moment, NeuroDiffEq doesn't support fractional derivatives.

from neurodiffeq.

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.