downscalePredictHidden.keras: Obtain the output of the hidden layers in a deep learning...

View source: R/downscalePredictHidden.keras.R

downscalePredictHidden.kerasR Documentation

Obtain the output of the hidden layers in a deep learning keras model for downscaling.

Description

Obtain the output of the hidden layers in a deep learning keras model for downscaling, previously infered with downscaleTrain.keras Also, returns the kernel of the corresponding hidden layer that generated the output.

Usage

downscalePredictHidden.keras(newdata, model, layer, clear.session)

Arguments

newdata

The grid data. It should be an object as returned by prepareNewData.keras.

model

An object containing the statistical model as returned from downscaleTrain.keras or a list of arguments passed to load_model_hdf5.

layer

A string or numeric value. The output of which hidden layer should be returned?

clear.session

A logical value. Indicates whether we want to destroy the current tensorflow graph and clear the model from memory. In particular, refers to whether we want to use the function k_clear_session after training. If FALSE, model is returned. If TRUE, then k_clear_session() is applied and no model is returned. Default to FALSE.

Details

This function relies on keras, which is a high-level neural networks API capable of running on top of tensorflow, CNTK or theano. There are official keras tutorials regarding how to build deep learning models. We suggest the user, especially the beginners, to consult these tutorials before using downscalePredictHidden.keras.

Value

A list containing the filter maps and the associated kernels.

Author(s)

J. Bano-Medina

See Also

downscaleTrain.keras for training a downscaling deep model with keras downscalePredict.keras for predicting with a keras model prepareNewData.keras for predictor preparation with new (test) data downscaleR.keras Wiki


SantanderMetGroup/downscaleR.keras documentation built on July 7, 2023, 1:22 p.m.