pyopmnearwell.ml.kerasify module
Transform keras models to an OPM format. Copied from https://github.com/fractalmanifold/opm-common/blob/cemracs/opm/material/fluidmatrixinteractions/ml_tools/kerasify.py.
- pyopmnearwell.ml.kerasify.export_model(model, filename)
Main routine.
- pyopmnearwell.ml.kerasify.write_convolution2d(file, layer, write_activation)
Process the Convolution2D layer.
- pyopmnearwell.ml.kerasify.write_dense(file, layer, write_activation)
Process the dense layer.
- pyopmnearwell.ml.kerasify.write_floats(file, floats)
Writes floats to file in 1024 chunks.. prevents memory explosion writing very large arrays to disk when calling struct.pack().
- pyopmnearwell.ml.kerasify.write_lstm(file, layer, write_activation)
Process the LSTM layer.