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)

Arguments

x

object of S3 class "gnn_GNN".

data

matrix to be fed forward through x.

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 May 29, 2024, 6:13 a.m.

Related to ffGNN in gnn...