CliMA / OceanParameterizations.jl

Machine learning (and uncertainty quantification?) of climate model parameterizations using differentiable (and probabilistic?) programming.
MIT License
21 stars 2 forks source link

[Free Convection] Add option for convolutional layer in NN and soft causality enforcement during training. #48

Closed upiterbarg closed 3 years ago

upiterbarg commented 3 years ago

Added two new arguments, 'conv' and 'spatial_causality', to train_free_convection_nde.jl.

The former allows for the specification of a desired convolutional filter size at run-time.

The latter toggles whether a penalty for spatial causality (i.e. that predictions for a grid point should only depend on grid points above) is added to the loss function throughout both phases of training. Concretely, if args['spatial_causality'] == 'soft', we add abs(weight)^2 for each weight value off of the lower triangle of the first dense layer in the NN at each training timestep to the loss.