dlpy.sequential.Sequential¶
-
class
dlpy.sequential.
Sequential
(conn, layers=None, model_table=None)¶ Bases: dlpy.model.Model
Model for sequentially building of deep learning models
Parameters: - conn : CAS
Specifies the CAS connection object
- layers : list-of-Layers, optional
Specifies the layers of the sequential model.
- model_table : string or dict or CAS table, optional
Specifies the CAS table to store the deep learning model.
Default: None
Returns: -
__init__
(conn, layers=None, model_table=None)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(conn[, layers, model_table]) Initialize self. add(layer) Add layer(s) to model change_labels(label_file, id_column, …) Overrides the labels already in the model compile() Convert the layer objects into CAS action parameters count_instances() count_params() Count the total number of parameters in the model create_layer_id_name_mapping() Create a dictionary which maps layer id to layer name. deploy(path[, output_format, model_weights, …]) Deploy the deep learning model to a data file evaluate(data[, text_parms, layer_out, …]) Evaluate the deep learning model on a specified validation data set evaluate_object_detection(ground_truth, …) Evaluate the deep learning model on a specified validation data set. fit(data[, inputs, target, data_specs, …]) Fitting a deep learning model. fit_and_visualize(data[, inputs, target, …]) Fitting a deep learning model while visulizing the fit and loss at each iteration. forecast([test_table, horizon, train_table, …]) Make forecasts based on deep learning models trained on TimeseriesTable. format_name([block_num, local_count]) Format the name of the layer from_caffe_model(conn, input_network_file[, …]) Generate a model object from a Caffe model proto file (e.g. from_keras_model(conn, keras_model[, …]) Generate a model object from a Keras model object from_onnx_model(conn, onnx_model[, …]) Generate a Model object from ONNX model. from_sashdat(conn, path[, output_model_table]) Generate a model object using the model information in the sashdat file from_table(input_model_table[, …]) Create a Model object from CAS table that defines a deep learning model get_feature_maps(data[, label, idx, image_id]) Extract the feature maps for a single image get_features(data, dense_layer[, target]) Extract linear features for a data table from the layer specified by dense_layer get_model_info() Return the information about the model table get_number_of_instances() heat_map_analysis([data, mask_width, …]) Conduct a heat map analysis on table of images load(path[, display_note]) Load the deep learning model architecture from existing table load_weights(path[, labels, data_spec, …]) Load the weights from a data file specified by ‘path’ load_weights_attr(path) Load the weights attribute form a sashdat file load_weights_from_caffe(path[, labels, …]) Load the model weights from a HDF5 file load_weights_from_file(path[, format_type, …]) Load the model weights from a HDF5 file load_weights_from_file_with_labels(path[, …]) Load the model weights from a HDF5 file load_weights_from_keras(path[, labels, …]) Load the model weights from a HDF5 file load_weights_from_table(path) Load the weights from a file plot_evaluate_res([cas_table, img_type, …]) Plot the bar chart of the classification predictions plot_heat_map([idx, alpha]) Display the heat maps analysis results plot_network() Display a graph that summarizes the model architecture. plot_training_history([items, fig_size, …]) Display the training iteration history. pop([loc]) Delete layer(s) from model and return it predict(data[, text_parms, layer_out, …]) Evaluate the deep learning model on a specified validation data set print_summary() Display a table that summarizes the model architecture save_to_astore([path, layers]) Save the model to an astore object, and write it into a file. save_to_onnx(path[, model_weights]) Save to ONNX model save_to_table(path) Save the model as SAS dataset save_to_table_with_caslibify(path) Save the model as SAS dataset save_weights_csv(path) Save model weights table as csv score(table[, model, init_weights, …]) Inference of input data with the trained deep learning model set_weights(weight_tbl) Assign weights to the Model object set_weights_attr(attr_tbl[, clear]) Attach the weights attribute to the model weights share_weights(layers) Share weights between layers switch(loc1, loc2) Switch the order of two layers in the model. to_functional_model([stop_layers]) Convert a Sequential into a functional model and return the functional model. to_model_params() Convert the model configuration to CAS action parameters train(table[, attributes, inputs, nominals, …]) Trains a deep learning model tune(data[, inputs, target]) Tunes hyper parameters for the deep learning model.