clDNN
Primitives
Collaboration diagram for Primitives:

Classes

struct  cldnn_activation_desc
 Activation using rectified linear unit or parameterized rectified linear unit. More...
 
struct  cldnn_batch_norm_desc
 Batch normalization primitive. More...
 
struct  cldnn_concatenation_desc
 
struct  cldnn_convolution_desc
 Performs forward spatial convolution with weight sharing. Also supports built-in Relu cldnn_activation_desc available by setting it in arguments. More...
 
struct  cldnn_crop_desc
 Performs crop operation on input. More...
 
struct  cldnn_custom_gpu_primitive_desc
 This primitive executes a custom kernel provided by the application. More...
 
struct  cldnn_data_desc
 Provides input data to topology. More...
 
struct  cldnn_deconvolution_desc
 Performs transposed convolution. Also supports built-in Relu cldnn_activation_desc available by setting it in arguments. More...
 
struct  cldnn_detection_output_desc
 Generates a list of detections based on location and confidence predictions by doing non maximum suppression. More...
 
struct  cldnn_eltwise_desc
 Performs elementwise operations (sum, subtract, max or product) on two input primitives Also supports built-in Relu cldnn_activation_desc available by setting it in arguments. . More...
 
struct  cldnn_fully_connected_desc
 Performs forward fully connected layer (inner product). Also supports built-in Relu cldnn_activation_desc available by setting it in arguments. More...
 
struct  cldnn_input_layout_desc
 Provides input layout for a data to be passed later to network. More...
 
struct  cldnn_lrn_desc
 Local response normalization. More...
 
struct  cldnn_normalize_desc
 Normalizes the input using an L2 norm and multiplies the output with scale value. The scale can be equal for all channels or one scale per channel. More...
 
struct  cldnn_permute_desc
 Permutes data in the memory, with respect to provided order. More...
 
struct  cldnn_pooling_desc
 Performs "pooling" operation which is a form of non-linear down-sampling. More...
 
struct  cldnn_prior_box_desc
 Generates a set of default bounding boxes with different sizes and aspect ratios. More...
 
struct  cldnn_proposal_desc
 
struct  cldnn_region_yolo_desc
 region softmax specific for yolo2 topology More...
 
struct  cldnn_reorder_desc
 Changes how data is ordered in memory. Value type is not changed & all information is preserved. More...
 
struct  cldnn_reorg_yolo_desc
 yolo2 topology specific data reorganization primitive More...
 
struct  cldnn_reshape_desc
 Changes information about inputs's layout effectively creating new memory which share underlaying buffer but is interpreted in a different way (different shape). More...
 
struct  cldnn_roi_pooling_desc
 
struct  cldnn_scale_desc
 Performs elementwise product of input and scale_input. More...
 
struct  cldnn_softmax_desc
 Normalizes results so they sum to 1. The scope of normalization is defined by a member dimension. More...
 
struct  cldnn_split_desc
 Performs split operation on input. More...
 
struct  cldnn_upsampling_desc
 Performs nearest neighbor/bilinear upsampling Also supports built-in Relu activation available by setting it in arguments. More...
 

Macros

#define CLDNN_ROI_VECTOR_SIZE   5
 

Enumerations

enum  cldnn_concatenation_axis { cldnn_concatenation_along_b = 0, cldnn_concatenation_along_f = CLDNN_TENSOR_BATCH_DIM_MAX, cldnn_concatenation_along_x = CLDNN_TENSOR_BATCH_DIM_MAX + CLDNN_TENSOR_FEATURE_DIM_MAX, cldnn_concatenation_along_y = cldnn_concatenation_along_x + 1 }
 
enum  cldnn_prior_box_code_type { cldnn_code_type_corner, cldnn_code_type_center_size, cldnn_code_type_corner_size }
 Select method for coding the prior-boxes in Detection Output layer ( cldnn_detection_output_desc ).
 
enum  cldnn_eltwise_mode { cldnn_eltwise_sum, cldnn_eltwise_sub, cldnn_eltwise_max, cldnn_eltwise_prod }
 Select mode for eltwise layer ( cldnn_eltwise_desc ​). More...
 
enum  cldnn_lrn_norm_region { cldnn_lrn_norm_region_across_channel, cldnn_lrn_norm_region_within_channel }
 
enum  cldnn_pooling_mode { cldnn_pooling_max, cldnn_pooling_average, cldnn_pooling_average_no_padding }
 Select method for Pooling layer ( cldnn_pooling_desc ). More...
 
enum  cldnn_softmax_dimension { cldnn_softmax_normalize_f, cldnn_softmax_normalize_x, cldnn_softmax_normalize_y, cldnn_softmax_normalize_fyx }
 Enum type to specify softmax's normalization scope (see cldnn_softmax_desc::dimension).
 
enum  cldnn_upsampling_sample_type { cldnn_upsampling_nearest, cldnn_upsampling_bilinear }
 Sample mode for upsampling layer ( cldnn_upsampling_desc ​). More...
 

Functions

cldnn_primitive_type_id cldnn_activation_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_batch_norm_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_concatenation_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_convolution_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_crop_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_custom_gpu_primitive_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_data_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_deconvolution_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_detection_output_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_eltwise_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_fully_connected_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_input_layout_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_lrn_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_normalize_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_permute_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_pooling_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_prior_box_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_proposal_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_region_yolo_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_reorder_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_reorg_yolo_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_reshape_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_roi_pooling_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_scale_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_softmax_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_split_type_id (cldnn_status *status)
 
cldnn_primitive_type_id cldnn_upsampling_type_id (cldnn_status *status)
 

Detailed Description


Class Documentation

◆ cldnn_activation_desc

struct cldnn_activation_desc

Activation using rectified linear unit or parameterized rectified linear unit.

Can get one negative slope or negative slope per channel.

Algorithm:
out(i,x,y) = max(0, in(i,x,y)) + slope(i) * min(0, in(i,x,y))
Where:
  • out(i,x,y) : value at x, y from i-th feature map after activation.
  • in(i,x,y) : value at x, y from i-th feature map before activation.
  • slope(i) : the slope value of the i-th feature map (can be shared across channels or one slope per channel).

Definition at line 41 of file activation.h.

Collaboration diagram for cldnn_activation_desc:
Class Members
cldnn_activation_func activation_func activation function.
cldnn_activation_additional_params additional_params Activation additional params. activation_relu_negative_slope - additional_params.a is a negative slope activation_brelu - additional_params.a is a upper bound activation_linear - additional_params.a/b uses as a*val + b.
cldnn_primitive_id additional_params_input Activation additional params stored on a memory object activation_relu_negative_slope - negative slope per feature map activation_brelu - upper bound per feature map activation_linear - a,b per feature map.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_batch_norm_desc

struct cldnn_batch_norm_desc

Batch normalization primitive.

Performs batch normalization as described in "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift" by Ioffe, Szegedy
See: http://arxiv.org/abs/1502.03167

Algorithm:
global stats can be computed as:
out[i] = in[i] - mean[b] / sqrt(variance[b] + epsilon)

Definition at line 42 of file batch_norm.h.

Collaboration diagram for cldnn_batch_norm_desc:
Class Members
float epsilon Epsilon.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_primitive_id mean Primitive id containing mean data.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.
cldnn_primitive_id variance Primitive id containing variance.

◆ cldnn_concatenation_desc

struct cldnn_concatenation_desc

Concatenation is used to concatenate multiple sources into one destination along specified dimension. Note that all other dimensions (except the one along which concatenation take place) must have the same value in each source and each source should have the same format.

Alogrithm:
int outputIdx = 0
for(i : input)
{
for(f : i.features)
{
output[outputIdx] = f
outputIdx += 1
}
}
Where:
  • input : data structure holding all source inputs for this primitive
  • output : data structure holding output data for this primitive
  • i.features : number of features in currently processed input
  • outputIdx : index of destination feature

Definition at line 61 of file concatenation.h.

Collaboration diagram for cldnn_concatenation_desc:
Class Members
cldnn_concatenation_axis axis Dimension along which concatenation should take place.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_convolution_desc

struct cldnn_convolution_desc

Performs forward spatial convolution with weight sharing. Also supports built-in Relu cldnn_activation_desc available by setting it in arguments.

Parameters are defined in context of "direct" convolution, but actual algorithm is not implied.

Definition at line 36 of file convolution.h.

Collaboration diagram for cldnn_convolution_desc:
Class Members
float activation_negative_slope Relu activation slope.
cldnn_primitive_id_arr bias Array of primitive ids containing bias data. Size of array should be equivalent to split.
cldnn_tensor dilation Defines gaps in the input - dilation rate k=1 is normal convolution, k=2 means skipping one pixel per input, k=4 means skipping 3 pixels. As an example in one dimension, a filter w of size 3 would compute over input x the following: w[0]*x[0] + w[1]*x[1] + w[2]*x[2] for dilation of 1. For dilation 2 the filter would instead compute w[0]*x[0] + w[1]*x[2] + w[2]*x[4].
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_tensor input_offset Defines a shift, relative to (0,0) position of the input buffer, where (0,0) point of the convolution window should start calculations.
cldnn_padding output_padding Output padding information.
cldnn_tensor output_size User-defined output data size of the primitive (w/o padding).
uint32_t split On how many cards split the computation to.
cldnn_tensor stride Defines shift in input buffer between adjacent calculations of output values.
cldnn_primitive_type_id type Primitive type identificator.
cldnn_primitive_id_arr weights Array of primitive ids containing weights data. Size of array should be equivalent to split.
uint32_t with_activation Enable Relu activation.
uint32_t with_output_size Indicates that the primitive has user-defined output size (non-zero value).

◆ cldnn_crop_desc

struct cldnn_crop_desc

Performs crop operation on input.

Crops the input to the shape of reference_input accross all dimensions taking into account specified input offsets.

Examples
Crop without offset example:

crop_no_offset.jpg


Crop with offset example:

crop_w_offset.jpg



Requirements
- Input, reference and offset layout (order) has to be the same
- Input size cannot be greater than reference size in any dimension
- All sizes have to have positive numbers
- Reference size plus offset cannot exceed input size
Breaking any of this conditions will cause exeption throw.

Definition at line 49 of file crop.h.

Collaboration diagram for cldnn_crop_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_tensor offsets Input offsets.
cldnn_padding output_padding Output padding information.
cldnn_tensor reference_input Reference input tensor with the required dimensions.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_custom_gpu_primitive_desc

struct cldnn_custom_gpu_primitive_desc

This primitive executes a custom kernel provided by the application.

The application is required to provide all relevant details for executing the custom kernel such as: sources, entry point, work sizes and parameter bindings.

Definition at line 36 of file custom_gpu_primitive.h.

Collaboration diagram for cldnn_custom_gpu_primitive_desc:
Class Members
cldnn_kernel_build_options build_options The kernel's build options.
cldnn_work_group_sizes gws The global working sizes.
int gws_num The number of global work sizes.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_kernel_arguments kernel_arguments Argument bindings for the entry point function.
int kernel_arguments_num The number of arguments used by the kernel.
cldnn_kernel_entry_point kernel_entry_point The name of the entry point function in the kernel.
cldnn_primitive_id_arr kernels_code Source code for the kernel.
cldnn_work_group_sizes lws The local working sizes.
int lws_num The number of local work sizes.
cldnn_layout output_layout The output layout declared by the primitive.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_data_desc

struct cldnn_data_desc

Provides input data to topology.

This primitive allows to pass data which is known at topology creation (constants). For example, weights and biases for scoring networks.

Note
Passing data at topology may improve network performance if data optimization is enabled.

Definition at line 37 of file data.h.

Collaboration diagram for cldnn_data_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_memory mem Memory object which contains data.
Note
If memory is attached by cldnn_attach_memory(), attached buffer should be valid on cldnn_build_network() call.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_deconvolution_desc

struct cldnn_deconvolution_desc

Performs transposed convolution. Also supports built-in Relu cldnn_activation_desc available by setting it in arguments.

Deconvolution is similar to convolution layer with the weights flipped on the axis and stride and input padding parameters used in opposite sense as in convolution.

Definition at line 36 of file deconvolution.h.

Collaboration diagram for cldnn_deconvolution_desc:
Class Members
float activation_negative_slope Relu activation slope.
cldnn_primitive_id_arr bias Array of primitive ids containing bias data. Size of array should be equivalent to split or should be empty (if not using bias).
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_tensor input_offset Defines a shift, relative to (0,0) position of the input buffer, where (0,0) point of the deconvolution window should start calculations.
cldnn_padding output_padding Output padding information.
cldnn_tensor output_size User-defined output data size of the primitive (w/o padding).
uint32_t split On how many cards split the computation to.
cldnn_tensor stride Defines the spatial dimensions of stride of adjacent elements in input buffer.
cldnn_primitive_type_id type Primitive type identificator.
cldnn_primitive_id_arr weights Array of primitive ids containing weights data. Size of array should be equivalent to split.
uint32_t with_activation Enables Relu activation.
uint32_t with_output_size Indicates that the primitive has user-defined output size (non-zero value).

◆ cldnn_detection_output_desc

struct cldnn_detection_output_desc

Generates a list of detections based on location and confidence predictions by doing non maximum suppression.

Each row is a 7 dimension vector, which stores: [image_id, label, confidence, xmin, ymin, xmax, ymax]. If number of detections per image is lower than keep_top_k, will write dummy results at the end with image_id=-1.

Definition at line 44 of file detection_output.h.

Collaboration diagram for cldnn_detection_output_desc:
Class Members
int background_label_id Background label id (-1 if there is no background class).
int32_t code_type Type of coding method for bounding box. See cldnn_prior_box_code_type.
float confidence_threshold Only keep detections with confidences larger than this threshold.
float eta Used for adaptive NMS.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
uint32_t keep_top_k Number of total bounding boxes to be kept per image after NMS step.
float nms_threshold Threshold for NMS step.
uint32_t num_classes Number of classes to be predicted.
cldnn_padding output_padding Output padding information.
uint32_t share_location If not 0, bounding box are shared among different classes.
int top_k Maximum number of results to be kept in NMS.
cldnn_primitive_type_id type Primitive type identificator.
uint32_t variance_encoded_in_target If not 0, variance is encoded in target; otherwise we need to adjust the predicted offset accordingly.

◆ cldnn_eltwise_desc

struct cldnn_eltwise_desc

Performs elementwise operations (sum, subtract, max or product) on two input primitives Also supports built-in Relu cldnn_activation_desc available by setting it in arguments. .

  • both inputs have to have equal sizes in all dimensions
  • format of both inputs has to be the same

Definition at line 51 of file eltwise.h.

Collaboration diagram for cldnn_eltwise_desc:
Class Members
float activation_negative_slope Relu activation slope.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
int32_t mode Eltwise mode. See cldnn_eltwise_mode.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.
uint32_t with_activation Enables Relu activation.

◆ cldnn_fully_connected_desc

struct cldnn_fully_connected_desc

Performs forward fully connected layer (inner product). Also supports built-in Relu cldnn_activation_desc available by setting it in arguments.

Definition at line 35 of file fully_connected.h.

Collaboration diagram for cldnn_fully_connected_desc:
Class Members
float activation_negative_slope Relu activation slope.
cldnn_primitive_id bias Primitive id containing bias data.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.
cldnn_primitive_id weights Primitive id containing weights data.
uint32_t with_activation Enable Relu activation.

◆ cldnn_input_layout_desc

struct cldnn_input_layout_desc

Provides input layout for a data to be passed later to network.

This primitive allows to define the layout for input data which will be passed to network before execution. For example, network input images.

Note
User should call network::set_input_data() for every input_layout primitive before network execution.
See also
network::set_input_data(), cldnn::data

Definition at line 39 of file input_layout.h.

Collaboration diagram for cldnn_input_layout_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_layout layout Defines layout for the data will be passed to network.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_lrn_desc

struct cldnn_lrn_desc

Local response normalization.

LRN layer as described in chapter 3.3 of "ImageNet Classification with Deep Convolutional Neural Networks" by Khrizevsky, Sutskever, Hinton.
See: http://www.cs.toronto.edu/~fritz/absps/imagenet.pdf

Alogrithm:
b(i,x,y) = a(i,x,y) / (k+alpha*sum(min(N-1, i+n/2); j=max(0,i-n/2); a(j,x,y)^2))
Where:
  • b(i,x,y) : value at x, y from i-th feature map after normalization
  • b(i,x,y) : value at x, y from i-th feature map before normalization
  • N : number of feature maps
  • n : size of normalization
  • k, alpha, beta : hyper parameters (equal to 2, 10e-4, 0.75 in paper).

Definition at line 50 of file lrn.h.

Collaboration diagram for cldnn_lrn_desc:
Class Members
float alpha Hyper parameter "alpha".
float beta Hyper parameter "beta".
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
float k Hyper parameter "k".
cldnn_lrn_norm_region norm_region Normalize across or within channel.
cldnn_padding output_padding Output padding information.
uint32_t size Size of normalization.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_normalize_desc

struct cldnn_normalize_desc

Normalizes the input using an L2 norm and multiplies the output with scale value. The scale can be equal for all channels or one scale per channel.

The L2 norm is computed as:
Across spatial mode (across_spatial=true)-
norm(i,x,y) = sqrt( Σ( in(f,w,h)^2 ) + epsilon ) where f in range (0,num_of_features), w in range (0,input_width), h in range (0,input_height).
The summation is performed over all the pixels in the batch.
Within spatial mode (across_spatial=false)-
norm(i,x,y) = sqrt( Σ( in(f,x,y)^2 ) + epsilon ) where f in range (0,num_of_features).
The summation is performed over this (x,y) position on all the features.

Algorithm:
out(i,x,y) = ( in(i,x,y) / norm(i,x,y) ) * scale(i)
Where:
  • out(i,x,y) : value at x, y from i-th feature map after normalization.
  • in(i,x,y) : value at x, y from i-th feature map before normalization.
  • norm(i,x,y) : L2 norm as described above.
  • scale(i) : the scale value of the i-th feature map.

Definition at line 49 of file normalize.h.

Collaboration diagram for cldnn_normalize_desc:
Class Members
uint32_t across_spatial Determines if the normalization is done across or within spatial (see documentation above).
float epsilon Epsilon for not dividing by zero while normalizing.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_id scale_input Scale input primitive id with values needed for scaling after the normalization. Scale x dimension should be 1 (if all channels have the same scale) or equal to input feature size (one scale per channel). All other dimensions should be 1.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_permute_desc

struct cldnn_permute_desc

Permutes data in the memory, with respect to provided order.

Permute order is set as vector with positions meaning corresponding to tensor. Vector values represent dimensions to be permuted in bfyx format. For example:
input_dimensions = tensor{ 5, 3, 6, 3 }
permute_order = { 2, 3, 1, 0 }
output_dimensions = { 6, 3, 3, 5 }

When permute_order is { 0, 1, 2, 3 } then input_dimensions = output_dimensions

Definition at line 41 of file permute.h.

Collaboration diagram for cldnn_permute_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_uint16_t_arr permute_order Array of permuted output order in bfyx format.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_pooling_desc

struct cldnn_pooling_desc

Performs "pooling" operation which is a form of non-linear down-sampling.

Pools the input image by taking the max, average, etc. within regions.

Definition at line 46 of file pooling.h.

Collaboration diagram for cldnn_pooling_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_tensor input_offset Defines a shift, relative to (0,0) position of the input buffer, where (0,0) point of the pooling window should start calculations.
int32_t mode Pooling method. See cldnn_pooling_mode.
cldnn_padding output_padding Output padding information.
cldnn_tensor output_size User-defined output data size of the primitive (w/o padding).
cldnn_tensor size Pooling kernel size.
cldnn_tensor stride Defines shift in input buffer between adjacent calculations of output values.
cldnn_primitive_type_id type Primitive type identificator.
uint32_t with_output_size Indicates that the primitive has user-defined output size (non-zero value).

◆ cldnn_prior_box_desc

struct cldnn_prior_box_desc

Generates a set of default bounding boxes with different sizes and aspect ratios.

The prior-boxes are shared across all the images in a batch (since they have the same width and height). First feature stores the mean of each prior coordinate. Second feature stores the variance of each prior coordinate.

Definition at line 37 of file prior_box.h.

Collaboration diagram for cldnn_prior_box_desc:
Class Members
cldnn_float_arr aspect_ratios Various of aspect ratios. Duplicate ratios will be ignored.
uint32_t clip If not 0, will clip the prior so that it is within [0, 1].
uint32_t flip If not 0, will flip each aspect ratio. For example, if there is aspect ratio "r", aspect ratio "1.0/r" we will generated as well.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_tensor img_size Image width and height.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_float_arr max_sizes Maximum box sizes in pixels.
cldnn_float_arr min_sizes Minimum box sizes in pixels.
float offset Offset to the top left corner of each cell.
cldnn_padding output_padding Output padding information.
float step_height Step height.
float step_width Step width.
cldnn_primitive_type_id type Primitive type identificator.
cldnn_float_arr variance Variance for adjusting the prior boxes.

◆ cldnn_proposal_desc

struct cldnn_proposal_desc

Definition at line 35 of file proposal.h.

Collaboration diagram for cldnn_proposal_desc:
Class Members
int feature_stride
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
float iou_threshold
int max_proposals
int min_bbox_size
cldnn_padding output_padding Output padding information.
int post_nms_topn
int pre_nms_topn
cldnn_float_arr ratios
cldnn_float_arr scales
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_region_yolo_desc

struct cldnn_region_yolo_desc

region softmax specific for yolo2 topology

Algorithm:
Where:

Definition at line 39 of file region_yolo.h.

Collaboration diagram for cldnn_region_yolo_desc:
Class Members
uint32_t classes paramter classes
uint32_t coords paramter coords
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
uint32_t num paramter num
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_reorder_desc

struct cldnn_reorder_desc

Changes how data is ordered in memory. Value type is not changed & all information is preserved.

Corresponding values are bitwise equal before/after reorder. Also merged with subtraction layer, which can subtract values while doing reordering. NOTE THAT THIS WILL SUBTRACT THE SAME VALUES FROM EACH BATCH.

Definition at line 37 of file reorder.h.

Collaboration diagram for cldnn_reorder_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_primitive_id mean_subtract Primitive id to get mean subtract values. Ignored if subtract_per_featrue is set.
cldnn_data_type output_data_type Requested memory data type.
cldnn_format_type output_format Requested memory format.
cldnn_padding output_padding Output padding information.
cldnn_float_arr subtract_per_feature Array of mean subtract values.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_reorg_yolo_desc

struct cldnn_reorg_yolo_desc

yolo2 topology specific data reorganization primitive

Algorithm:
Where:

Definition at line 39 of file reorg_yolo.h.

Collaboration diagram for cldnn_reorg_yolo_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
uint32_t stride paramter stride
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_reshape_desc

struct cldnn_reshape_desc

Changes information about inputs's layout effectively creating new memory which share underlaying buffer but is interpreted in a different way (different shape).

Note
reshape primitive is supposed only to reinterpret shape of the memory therefore it's not possible to change neither data type nor format of the input buffer and total number of elements in input and output (excluding paddings) must match.

Definition at line 37 of file reshape.h.

Collaboration diagram for cldnn_reshape_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_tensor output_shape Requested memory shape.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_roi_pooling_desc

struct cldnn_roi_pooling_desc

Definition at line 34 of file roi_pooling.h.

Collaboration diagram for cldnn_roi_pooling_desc:
Class Members
int group_sz Group size as defined by PSRoIPooling when > 0, else if 0 means regular RoIPooling.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
int32_t mode Pooling method. See cldnn_pooling_mode.
cldnn_padding output_padding Output padding information.
int pooled_height Output height.
int pooled_width Output width.
float spatial_scale Ratio of the coordinates used in RoIs to the width (and height) of the input data.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_scale_desc

struct cldnn_scale_desc

Performs elementwise product of input and scale_input.

Scale input dimension should be equal to input dimension or be 1 if it is not there.
Input size : 2x3x4x5(BFYX)
Possible scale inputs sizes :
2x3x4x5 - works the same as(axis == 0 == -4) in caffe
1x3x4x5 - works the same as(axis == 1 == -3) in caffe
1x1x4x5 - works the same as(axis == 2 == -2) in caffe
1x1x1x5 - works the same as(axis == 3 == -1) in caffe
1x1x1x1 - works the same as empty shape(scalar) in caffe
When scale_input is the same as input, the behavior is the same as cldnn_eltwise_desc with product operation.
Performs scale over feature when the scale feature size is equal to input feature size.
Performs scale over feature in batch when the scale feature and scale batch sizes are equal to input feature and input batch sizes.
Optionally it can also add provided biases by setting bias_term.

Definition at line 46 of file scale.h.

Collaboration diagram for cldnn_scale_desc:
Class Members
cldnn_primitive_id bias Primitive id containing bias data.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_softmax_desc

struct cldnn_softmax_desc

Normalizes results so they sum to 1. The scope of normalization is defined by a member dimension.

Algorithm:
b = e^a/sum(N-1; j=0; e^j)
Where:
  • N : number of values to normalize
  • b : value after normalization
  • a : value before normalization

Definition at line 50 of file softmax.h.

Collaboration diagram for cldnn_softmax_desc:
Class Members
cldnn_softmax_dimension dimension Defines a scope of a single softmax normalization.

Being given a 4-dimensional input, which consists of b,f,y,x dimensions, softmax normalizes data which are divided into multiple independent sets. Specific behavior is determined by this parameter, as follows:

cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_split_desc

struct cldnn_split_desc

Performs split operation on input.

splits the input data into n parts, for each user provides name and offsets.
User cannot use split primitive directly.
It is needed to refer to the output ids with the name "<split_prim_id>:<split_output_id>".

Assumptions
- offsets1 < offsets2 < offsets3 < ...
- size[n] = offsets[n+1] - offsets[n];
- last element: size[n] = split_input.size - offsets[n];
- no buffer overlapping, as the output size is calculated using offset and input size
- split primitive id cannot be used by any other primitive (user needs to use output_ids only)
Breaking any of this conditions will cause exeption throw.

Example:
Splitting output to 2 parts by the features:
input_size = { 2, 4, 3, 5 };
split_id = "split";
output_ids_offsets[0] = { "out0", { 0,0,0,0 } };
output_ids_offsets[1] = { "out1", { 0,2,0,0 } };
After split there would be 2 primitives: "split:out0" and "split:out1" which contain 2 feature maps (lower and upper)

Definition at line 54 of file split.h.

Collaboration diagram for cldnn_split_desc:
Class Members
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
cldnn_primitive_id_arr output_ids List of output_ids.
cldnn_tensor_arr output_offsets Array of tensors with offsets.
cldnn_padding output_padding Output padding information.
cldnn_primitive_type_id type Primitive type identificator.

◆ cldnn_upsampling_desc

struct cldnn_upsampling_desc

Performs nearest neighbor/bilinear upsampling Also supports built-in Relu activation available by setting it in arguments.

Definition at line 44 of file upsampling.h.

Collaboration diagram for cldnn_upsampling_desc:
Class Members
float activation_negative_slope Relu activation slope.
cldnn_primitive_id id Primitive id unique within a topology.
cldnn_primitive_id_arr input Input primitives ids.
uint32_t num_filter
Parameters
num_filterInput filter. Only used by bilinear sample_type.
cldnn_padding output_padding Output padding information.
int32_t sample_type
Parameters
sample_typeUpsampling method (nearest neighbor/bilinear).
uint32_t scale
Parameters
scaleUpsampling scale.
cldnn_primitive_type_id type Primitive type identificator.
uint32_t with_activation Enables Relu activation.

Enumeration Type Documentation

◆ cldnn_eltwise_mode

Select mode for eltwise layer ( cldnn_eltwise_desc ​).

Enumerator
cldnn_eltwise_sum 

Eltwise sum.

cldnn_eltwise_sub 

Eltwise subtract.

cldnn_eltwise_max 

Eltwise max.

cldnn_eltwise_prod 

Eltwise product (Hamarad).

Definition at line 34 of file eltwise.h.

◆ cldnn_pooling_mode

Select method for Pooling layer ( cldnn_pooling_desc ).

Enumerator
cldnn_pooling_max 

Maximum-pooling method.

cldnn_pooling_average 

Average-pooling method.

cldnn_pooling_average_no_padding 

Average-pooling method without values which are outside of the input.

Definition at line 34 of file pooling.h.

◆ cldnn_upsampling_sample_type

Sample mode for upsampling layer ( cldnn_upsampling_desc ​).

Enumerator
cldnn_upsampling_nearest 

upsampling nearest neighbor.

cldnn_upsampling_bilinear 

upsampling bilinear.

Definition at line 34 of file upsampling.h.