Skip to content

0.99.20

Compare
Choose a tag to compare
@Joao-L-S-Almeida Joao-L-S-Almeida released this 28 Apr 19:25
· 417 commits to main since this release
  • When using Physics-informed DeepONets, it is possible to use either trunk and branch input variables as inputs for the symbolic expressions, as seen below:
residual = SymbolicOperator(                                                  
    expressions=[f],
    input_vars=input_labels,
    output_vars=output_labels,
    function=manufactured_net,
    inputs_key="input_trunk|input_branch:0|input_branch:1",
    constants={"pi":np.pi},
    device="gpu",
    engine="torch",
)

The argument inputs_key defines that the inputs for the symbolic expressions corresponds to the concatenation among input_trunk and the first and the second columns of input_branch.

  • Communication with SciPy optimizers is now enabled, as can be seen the code snippet below:
from simulai.optimization import PIRMSELoss, ScipyInterface

loss_instance = PIRMSELoss(operator=net)

optimizer_lbfgs = ScipyInterface(
    fun=net, optimizer="L-BFGS-B", loss=loss_instance, loss_config=params
)

optimizer_lbfgs.fit(input_data=data)

See this example for more details.

  • Batch-normalization can be set for automatically generated AutoEncoders using the boolean argument use_batch_norm:
autoencoder = AutoencoderVariational(
        input_dim=(None, 1, 64, 128),
        latent_dim=8,
        activation="tanh",
        architecture="cnn",
        case="2d",
        use_batch_norm=True,
    )