pyopmnearwell.ml.kerasify module#

Transform keras models to an OPM format. Copied from fractalmanifold/opm-common.

write_dense(file, layer, write_activation)[source]#

Process the dense layer.

write_convolution2d(file, layer, write_activation)[source]#

Process the Convolution2D layer.

write_lstm(file, layer, write_activation)[source]#

Process the LSTM layer.

write_floats(file, floats)[source]#

Writes floats to file in 1024 chunks.. prevents memory explosion writing very large arrays to disk when calling struct.pack().

export_model(model, filename)[source]#

Main routine.