| make_train_step | R Documentation |
Returns a closure that, when called with a mini-batch, computes the combined data + physics loss and applies gradients.
make_train_step(
theta_model,
optimizer,
lambda_wet = 1,
lambda_dry = 10,
wet_split_cm = NULL,
lambda3 = 1,
lambda4 = 1000,
lambda5 = 1000,
lambda6 = 1,
s3_form = c("inequality", "equality"),
pf_left = -2,
pf_right = 7.6,
pF_lin_min = 5,
pF_lin_max = 7.6,
compile = TRUE
)
theta_model |
Keras model returned by |
optimizer |
A Keras/TF optimizer (e.g. |
lambda_wet |
Weight for wet-end data loss (default |
lambda_dry |
Weight for dry-end data loss (default |
wet_split_cm |
Matric head threshold, in centimetres, separating
wet from dry observations, or |
lambda3 |
S1 linearity weight (default |
lambda4 |
S2 non-negativity weight (default |
lambda5 |
S3 non-positivity weight (default |
lambda6 |
S4 saturation weight (default |
s3_form |
Form of the S3 dry-end residual, |
pf_left |
Left boundary of pF domain (default |
pf_right |
Right boundary of pF domain (default |
pF_lin_min, pF_lin_max |
pF range over which S1 enforces dry-end
linearity (defaults |
compile |
If |
A function f(Xseq, pf_norm_obs, y, sw) that performs one
gradient step and returns a named list of loss scalars.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.