Learn R Programming

gnn (version 0.0-4)

ffGNN: Feedforward for Generative Neural Networks

Description

Feedforward method for objects of S3 class "gnn_GNN".

Usage

# S3 method for gnn_GNN
ffGNN(x, data)

Value

The output matrix of x when fed with data.

Arguments

x

object of S3 class "gnn_GNN".

data

matrix to be fed forward through x.

Author

Marius Hofert

Examples

Run this code
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))

}

Run the code above in your browser using DataLab