ffGNN: Feedforward for Generative Neural Networks

View source: R/ffGNN.R

ffGNNR Documentation

Feedforward for Generative Neural Networks

Description

Feedforward method for objects of S3 class "gnn_GNN".

Usage

## S3 method for class 'gnn_GNN'
ffGNN(x, data, verbose = 0)

Arguments

x

object of S3 class "gnn_GNN".

data

matrix to be fed forward through x.

verbose

verbosity level of the underlying predict.keras.engine.training.Model{}.

Value

The output matrix of x when fed with data.

Author(s)

Marius Hofert

Examples

if(TensorFlow_available()) { # rather restrictive (due to R-Forge, winbuilder)
library(gnn) # for being standalone

## Define dummy model
d <- 2 # bivariate case
GMMN <- FNN(c(d, 300, d)) # Feedforward NN with MMD loss (a GMMN; random weights)

## Feedforward
n <- 3
set.seed(271)
X <- ffGNN(GMMN, data = matrix(runif(n * d), ncol = d))
stopifnot(dim(X) == c(n, d))
}

gnn documentation built on July 24, 2025, 3:03 a.m.

Related to ffGNN in gnn...