Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicit time dependence #5

Open
yohai opened this issue Jun 17, 2019 · 2 comments
Open

explicit time dependence #5

yohai opened this issue Jun 17, 2019 · 2 comments

Comments

@yohai
Copy link
Collaborator

yohai commented Jun 17, 2019

https://github.com/googleprivate/pde-superresolution-2d/blob/6981ff1ee8a1bc99275d34d5f835213d02b174f8/pde_superresolution_2d/core/equations.py#L159-L161
@shoyer @JiaweiZhuang I think we might want to change the signature of equation.time_derivative to include the time:

 def time_derivative( 
     self, time, grid: grids.Grid, **inputs: tf.Tensor 
 ) -> Dict[str, tf.Tensor]:

For cases where the equation depends explicitly on time (e.g time-dependent forcing)

@shoyer
Copy link
Collaborator

shoyer commented Jun 17, 2019

Yes, indeed. The other option would be to put "time" as a variable in **inputs. I'll need to think about this a little more...

@yohai
Copy link
Collaborator Author

yohai commented Jun 17, 2019

I considered that, but I think this is more natural since time is a very generic parameter. It also follows the logic of odeint of scipy and the such (ode45 of MATLAB etc).
Also, if grid (which is space) is special enough to be a mandatory named argument then time should also be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants