MicrosoftPad
Description
Given data tensor, pads, mode, and value. Example: Insert 0 pads to the beginning of the second dimension. data = [ [1.0, 1.2], [2.3, 3.4], [4.5, 5.7], ] pads = [0, 2, 0, 0] output = [ [ [0.0, 0.0, 1.0, 1.2], [0.0, 0.0, 2.3, 3.4], [0.0, 0.0, 4.5, 5.7], ], ].
Documentation illustration (illustration unavailable in the archive).
Input parameters
specified_outputs_name : array, this parameter lets you manually assign custom names to the output tensors of a node.
Graphs in : cluster, ONNX model architecture.
data (heterogeneous) – T : object, input tensor.
pads (heterogeneous) – tensor(int64) : object, tensor of integers indicating the number of padding elements to add or remove (if negative) at the beginning and end of each axis. For 2D input tensor, it is the number of pixels. `pads` should be a 1D tensor of shape [2 * input_rank] or a 2D tensor of shape [1, 2 * input_rank]. `pads` format (1D example) should be as follow [x1_begin, x2_begin,…,x1_end, x2_end,…], where xi_begin is the number of pixels added at the beginning of axis `i` and xi_end, the number of pixels added at the end of axis `i`.
constant_value (optional, heterogeneous) – T : object, a scalar or rank 1 tensor containing a single value to be filled if the mode chosen is `constant`.
Documentation illustration (illustration unavailable in the archive).
Parameters : cluster,
mode : enum, three modes : `constant`- pads with a given constant value, `reflect`- pads with the reflection of the vector mirrored on the first and last values of the vector along each axis, `edge`- pads with the edge values of array.
Default value “constant”.
training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.
name (optional) : string, name of the node.
Documentation illustration (illustration unavailable in the archive).
Output parameters
output (heterogeneous) – T : object, tensor after padding.
Type Constraints
tensor(double), tensor(float), tensor(float16)) : Constrain input and output types to float tensors.
Example
All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
