Add a primitive call to a graph descriptor.
Usage
graph_desc_add(
prim,
args,
params = list(),
infer_fn,
desc = NULL,
debug_mode = NULL
)Arguments
- prim
(
Primitive)
The primitive to add.- args
(
listofGraphNode)
The arguments to the primitive.- params
(
list)
The parameters to the primitive.- infer_fn
(
function)
The inference function to use. Must output a list ofAbstractTensors.- desc
(
GraphDescriptor|NULL)
The graph descriptor to add the primitive call to. Uses the current descriptor ifNULL.- debug_mode
(
logical(1))
Whether to just perform abstract evaluation for debugging.