ode_trainingSelect

Functions for selecting what training file specific solveODE call directs too.

While available to user, not meant to be used.

PINNtrainSelect_Standard(de_points, inits, t, epochs, eqn, order, net_layers, net_units, constraint, model, flag)

Main selecting function which determines what problem is being solved and directs information from solveODE call and solution class to the correct training file

Parameters:
  • de_points (list) –

    Randomly sampled points network uses to learn

  • inits (list) –

    Inital/Boundary values for each derivative

  • t (list) –

    Randomly sampled points along t

  • epochs (int) –

    Number of epochs model gets trained for

  • eqn (string / list) –

    Equation(s) to be solved

  • order (int / list) –

    Order(s) of equation(s)

  • net_layers (int) –

    Number of internal layers for network

  • net_units (int) –

    Number of nodes for each internal layer for network

  • constraint (string) –

    Constraint of inital conditions, "soft" or "hard'

  • model (PINN) –

    Model directly from solveODE call. If None, model will be created from an ode_ModelFuncs function. If not None, will try and use input model for training.

  • flag (string) –

    Internal flag for what type of equation is being solved

Returns:
  • epoch_loss( list ) –

    Total loss over training of model

  • vp_loss( list ) –

    Inital Value or Boundary value loss over training of model

  • de_loss( list ) –

    Differential equation loss over training of model

  • model( PINN ) –

    Trained model to predict equation(s) over t

PINNtrainSelect_DeepONet(de_points, inits, t, epochs, eqn, order, orig_orders, N_sensors, sensor_range, net_layers, net_units, constraint, flag)

Main selecting function which determines what problem is being solved and directs information from solveODE_DeepONet call and solution class to the correct training file

Parameters:
  • de_points (list) –

    Number of points to sample. Input N_pde.

  • inits (list) –

    Inital/Boundary values for each derivative

  • t (list) –

    Randomly sampled points along t

  • epochs (int) –

    Number of epochs model gets trained for

  • eqn (string) –

    Equation(s) to be solved

  • order (int / list) –

    Order(s) of equation(s)

  • orig_orders (int / list) –

    Original orders of equations input. Rearranged in corresponding solution class

  • N_sensors (int) –

    Number of sensors in which network learns over.

  • sensor_range (list) –

    range in which sensors are sampled over.

  • net_layers (int) –

    Number of internal layers for network

  • net_units (int) –

    Number of nodes for each internal layer for network

  • constraint (string) –

    Constraint of inital conditions, "soft" or "hard"

  • flag (string) –

    Internal flag for what type of equation is being solved

Returns:
  • loss( list ) –

    Total loss over training of model

  • t( list ) –

    Evenly spaced points over t

  • solPred( list ) –

    Solution prediction of trained model

  • params( array ) –

    Trained parameters of model

  • model( DeepONet ) –

    Trained model to predict equation(s) over t

  • de_points( list ) –

    Randomly sampled points that model trains with

  • sensors( list ) –

    Randomly sampled sensors the model trains with