cg_input {cgraph} | R Documentation |
Add an input node to the active graph.
cg_input(name = NULL)
name |
character scalar, name of the node (optional). In case argument |
cg_node object.
Inputs cannot be assigned a fixed value but behave as placeholders. Values can be assigned to inputs when evaluating or differentiating a graph (see cg_graph_run and cg_graph_gradients for more details).
Ron Triepels
# Initialize a computational graph x <- cg_graph() # Add a parameter with name 'a' to the graph. a <- cg_input(name = "a")