google / google/jax-cfd

trajectory function use target_trajectory as input in loss_and_gradient

Open
#201 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
964
Forks
142
Avg merge
3h 9m
Merged PRs (30d)
1

Description

Hi,

I'm trying to understand the logic behind the various functions in ml.train_utils.

in the definition of loss_and_gradient the returned _loss function uses the target trajectory as part of the input of the trajectory_fn. I cannot make sense of it. The description of the function states that the trajectory_fn should accepts `params` and `initial_velocity`, which make sense to me, but then I don't understand why would we want to use the target_trajectory as the initial_velocity (which presumably doesn't have the same shape as initial_velocity since one is a trajectory and the other the velocity at a single time step).

I'm pretty much stuck here because I now don't know how to use this in the context of defining a train_step function etc.

Best regards,

Gwen

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.