cg_init_uniform: Add Parameter

Description Usage Arguments Value Note Author(s) Examples

View source: R/initializer.R

Description

Add a parameter to the active graph whose value is initialized by a uniform distribution.

Usage

1

Arguments

...

numerical scalars, the dimensions of the parameter.

min

numerical scalar, the lower bound of the uniform distribution (optional).

max

numerical scalar, the upper bound of the uniform distribution (optional).

name

character scalar, name of the node (optional). In case argument name is missing, the node is added to the graph under an automatically generated name.

Value

cg_node object.

Note

The dimensions provided to ... must be non-negative whole numbers.

Author(s)

Ron Triepels

Examples

1
2
3
4
5
# Initialize a computational graph
graph <- cg_graph()

# Add a parameter to the graph
a <- cg_init_uniform(2, 3, min = -1, max = 1, name = "a")

triepels/cgraph documentation built on April 24, 2020, 12:58 a.m.