dlpy.model.Model.from_keras_model

classmethod Model.from_keras_model(conn, keras_model, output_model_table=None, offsets=None, std=None, scale=1.0, max_num_frames=-1, include_weights=False, input_weights_file=None, verbose=False)

Generate a model object from a Keras model object

Parameters:
conn : CAS

The CAS connection object.

keras_model : keras_model object

Specifies the keras model to be converted.

output_model_table : string or dict or CAS table, optional

Specifies the CAS table to store the deep learning model.
Default: None

offsets : list, optional

Specifies the values to be subtracted from the pixel values of the input data, used if the data is an image.

std : list or None

The pixel values of the input data are divided by these values, used if the data is an image.

scale : float, optional

Specifies the scaling factor to apply to each image.

max_num_frames : int, optional

Maximum number of frames for sequence processing.

include_weights : bool, optional

Specifies whether to load the weights of the keras model.
Default: True

input_weights_file : string, optional

A fully specified client side path to the HDF5 file that stores the keras model weights. Only effective when include_weights=True. If None is given, the current weights in the keras model will be used.
Default: None

verbose : boolean optional

Specifies whether to print warning messages and debugging information
Default: False

Returns:
Model
boolean : use GPU