The shape of torch_reshape(x, shape), which is what
nn_reshape() infers. The dimension that torch infers from the
number of elements is resolved here whenever that number is known, and stays unknown otherwise.
Arguments
- shape_in
(
integer())
The input shape, withNAfor the dimensions whose size is unknown.- shape
(
integer()|function())
The target shape, where-1marks the dimension thattorchinfers from the number of elements. Afunction(shape)of the input shape is called on it and must return such a vector, which lets a reshape be expressed for inputs whose sizes are not known in advance, e.g.\(shape) c(shape[1:2], 10).- id
(
character(1))
The id of thePipeOp, which the error messages name.
Value
(integer()) The output shape.
See also
Other Shape Inference:
infer_shapes(),
shape_to_str()