get_gradients: Computes the gradients of the neural network.

View source: R/integratedGradients.R

get_gradientsR Documentation

Computes the gradients of the neural network.

Description

Given a neural network, computes the gradients for a particular predictand (or output neuron of the model) w.r.t an input predictand field.

Usage

get_gradients(input, site, model)

Arguments

input

The predictor field in matrix/array format.

site

A data frame containing the 'x' and 'y' coordinates of the desired site where to compute the gradients. e.g., site = data.frame("x" = -3.82, "y" = 43.46)

model

A keras sequential or functional model.

Value

A matrix/array of the gradients of the predictions w.r.t input

Author(s)

J. Bano-Medina


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