Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)  0.21.0
Performance library for Deep Learning
Functions
Inner product

A primitive to compute an inner product. More...

Functions

mkldnn_status_t MKLDNN_API mkldnn_inner_product_forward_desc_init (mkldnn_inner_product_desc_t *ip_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc)
 Initializes an inner product descriptor ip_desc for forward propagation using prop_kind (possible values are mkldnn_forward_training and mkldnn_forward_inference) and memory descriptors. More...
 
mkldnn_status_t MKLDNN_API mkldnn_inner_product_backward_data_desc_init (mkldnn_inner_product_desc_t *ip_desc, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc)
 Initializes an inner product descriptor ip_desc for backward propagation with respect to data using memory descriptors. More...
 
mkldnn_status_t MKLDNN_API mkldnn_inner_product_backward_weights_desc_init (mkldnn_inner_product_desc_t *ip_desc, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc)
 Initializes an inner product descriptor ip_desc for backward propagation with respect to weights using memory descriptors. More...
 

Detailed Description

A primitive to compute an inner product.

Inner product layer is also known as fully connected layer. With spatial dimension:

\[dst[n][oc] = \sum\limits_{ic, kh, kw} src[n][ic][kh][kw] \cdot weights[oc][ic][kh][kw] + bias[oc]\]

Function Documentation

◆ mkldnn_inner_product_forward_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_inner_product_forward_desc_init ( mkldnn_inner_product_desc_t ip_desc,
mkldnn_prop_kind_t  prop_kind,
const mkldnn_memory_desc_t src_desc,
const mkldnn_memory_desc_t weights_desc,
const mkldnn_memory_desc_t bias_desc,
const mkldnn_memory_desc_t dst_desc 
)

Initializes an inner product descriptor ip_desc for forward propagation using prop_kind (possible values are mkldnn_forward_training and mkldnn_forward_inference) and memory descriptors.

In order to create an inner product without bias, bias_desc should be either NULL or a pointer to a descriptor with memory format equal to mkldnn_format_undef.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_inner_product_backward_data_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_inner_product_backward_data_desc_init ( mkldnn_inner_product_desc_t ip_desc,
const mkldnn_memory_desc_t diff_src_desc,
const mkldnn_memory_desc_t weights_desc,
const mkldnn_memory_desc_t diff_dst_desc 
)

Initializes an inner product descriptor ip_desc for backward propagation with respect to data using memory descriptors.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs:

◆ mkldnn_inner_product_backward_weights_desc_init()

mkldnn_status_t MKLDNN_API mkldnn_inner_product_backward_weights_desc_init ( mkldnn_inner_product_desc_t ip_desc,
const mkldnn_memory_desc_t src_desc,
const mkldnn_memory_desc_t diff_weights_desc,
const mkldnn_memory_desc_t diff_bias_desc,
const mkldnn_memory_desc_t diff_dst_desc 
)

Initializes an inner product descriptor ip_desc for backward propagation with respect to weights using memory descriptors.

Note
Memory descriptors are allowed to be initialized with mkldnn_any value of format_kind.

Order of inputs:

Order of outputs: