Skip to contents

Loads a pretrained convolutional neural network (CNN) model for classifying Gramian Angular Field representations of poly(A) tail signal chunks into nucleotide categories (A, C, G, U). When called without arguments, the default model bundled with ninetails is loaded. A custom model path can be provided for user-trained models.

Usage

load_keras_model(keras_model_path)

Arguments

keras_model_path

Character string or missing. Full path of the .h5 file with a Keras model. If missing (default), the pretrained model shipped with the package is loaded. Otherwise, the specified custom model is loaded.

Value

A Keras model object ready for prediction.

See also

predict_gaf_classes where this function is called, combine_gafs for preparing GAF input arrays

Examples

if (FALSE) { # \dontrun{

# Load default pretrained model
model <- load_keras_model()

# Load custom model
model <- load_keras_model(
  keras_model_path = "/path/to/the/model/in/hdf5_format"
)

} # }