Learn R Programming

cgraph (version 3.0.1)

opr: Add Operation

Description

Add an operation node to the active graph.

Usage

opr(call, grads, args, name = NULL)

Arguments

call

symbol, operation performed by the node.

grads

list of symbols, gradients functions of the input nodes that are consumed by the operation in argument call.

args

list of cg_node objects, the nodes that are consumed by the operation in argument call.

name

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

Value

cg_node, operation.