Learn R Programming

ggmlR (version 0.8.4)

nn_functional_weight_elements: Count the weight elements a functional node will allocate

Description

Mirrors the tensor shapes nn_build_functional_node creates in ctx_weights, so the context can be sized before the tensors exist. Weights do not scale with the batch, which is what makes this a separate count from the activations rather than a factor applied to them.

Usage

nn_functional_weight_elements(node, parent_shapes)

Arguments

Value

A double, the number of float elements the node's weights occupy.

Details

Returns a double: a wide dense layer can exceed integer range on its own.