clDNN
cldnn::deconvolution Struct Reference

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

#include <deconvolution.hpp>

Inheritance diagram for cldnn::deconvolution:
Collaboration diagram for cldnn::deconvolution:

Public Types

typedef cldnn_deconvolution_desc dto
 

Public Member Functions

 deconvolution (const primitive_id &id, const primitive_id &input, const std::vector< primitive_id > &weights, const std::vector< primitive_id > &bias, tensor stride={ 1, 1, 1, 1 }, tensor input_offset={ 0, 0, 0, 0 }, bool with_activation=false, float activation_slp=0.0f, const padding &output_padding=padding())
 Constructs deconvolution primitive. More...
 
 deconvolution (const primitive_id &id, const primitive_id &input, const std::vector< primitive_id > &weights, tensor stride={ 1, 1, 1, 1 }, tensor input_offset={ 0, 0, 0, 0 }, bool with_activation=false, float activation_slp=0.0f, const padding &output_padding=padding())
 Constructs deconvolution primitive (w/o bias). More...
 
 deconvolution (const primitive_id &id, const primitive_id &input, const std::vector< primitive_id > &weights, const std::vector< primitive_id > &bias, tensor stride, tensor input_offset, bool with_activation, float activation_slp, tensor output_size, const padding &output_padding=padding())
 Constructs deconvolution primitive (computes input paddings to match output size). More...
 
 deconvolution (const primitive_id &id, const primitive_id &input, const std::vector< primitive_id > &weights, tensor stride, tensor input_offset, bool with_activation, float activation_slp, tensor output_size, const padding &output_padding=padding())
 Constructs deconvolution primitive (w/o bias, computes input paddings to match output size). More...
 
 deconvolution (const dto *dto)
 Constructs a copy from C API cldnn_deconvolution_desc.
 
int32_t split () const
 On how many cards split the computation to.
 
- Public Member Functions inherited from cldnn::primitive_base< deconvolution, cldnn_deconvolution_desc >
const cldnn_primitive_descget_dto () const override
 Returns pointer to a C API primitive descriptor casted to cldnn_primitive_desc.
 
- Public Member Functions inherited from cldnn::primitive
 primitive (const primitive_type_id &type, const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive (const cldnn_primitive_desc *dto)
 Constructs a copy from basic C API cldnn_primitive_desc.
 
std::vector< std::reference_wrapper< primitive_id > > dependecies ()
 Returns references to all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
std::vector< primitive_iddependecies () const
 Returns copy of all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
 operator primitive_id () const
 Implicit conversion to primiitive id.
 

Static Public Member Functions

static primitive_type_id type_id ()
 
static deconvolution create_with_output_size (const primitive_id &id, const primitive_id &input, const std::vector< primitive_id > &weights, const std::vector< primitive_id > &bias, tensor output_size, tensor stride={ 1, 1, 1, 1 }, tensor input_offset={ 0, 0, 0, 0 }, bool with_activation=false, float activation_slp=0.0f, const padding &output_padding=padding())
 Constructs deconvolution primitive (computes input paddings to match output size). More...
 
static deconvolution create_with_output_size (const primitive_id &id, const primitive_id &input, const std::vector< primitive_id > &weights, tensor output_size, tensor stride={ 1, 1, 1, 1 }, tensor input_offset={ 0, 0, 0, 0 }, bool with_activation=false, float activation_slp=0.0f, const padding &output_padding=padding())
 Constructs deconvolution primitive (w/o bias; computes input paddings to match output size). More...
 

Public Attributes

fixed_size_vector_ref weights
 List of primitive ids containing weights data.
 
fixed_size_vector_ref bias
 List of primitive ids containing bias data.
 
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.
 
tensor stride
 Defines shift in input buffer between adjacent calculations of output values.
 
bool with_activation
 Enables Relu activation.
 
float activation_negative_slope
 Relu activation slope.
 
bool with_output_size
 Indicates that the primitive has user-defined output size (non-zero value).
 
tensor output_size
 User-defined output data size of the primitive (w/o padding).
 
- Public Attributes inherited from cldnn::primitive
const primitive_type_id type
 Primitive's type id.
 
const primitive_id id
 Primitive's id.
 
fixed_size_vector_ref input
 List of ids of input primitives.
 
padding output_padding
 Requested output padding.
 

Protected Member Functions

std::vector< std::reference_wrapper< const primitive_id > > get_dependencies () const override
 
void update_dto (dto &dto) const override
 
- Protected Member Functions inherited from cldnn::primitive_base< deconvolution, cldnn_deconvolution_desc >
 primitive_base (const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive_base (const cldnn_deconvolution_desc *dto)
 

Protected Attributes

primitive_id_arr _weights
 
primitive_id_arr _bias
 
- Protected Attributes inherited from cldnn::primitive
primitive_id_arr _input
 

Detailed Description

Performs transposed convolution. Also supports built-in Relu activation 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 34 of file deconvolution.hpp.

Constructor & Destructor Documentation

◆ deconvolution() [1/4]

cldnn::deconvolution::deconvolution ( const primitive_id id,
const primitive_id input,
const std::vector< primitive_id > &  weights,
const std::vector< primitive_id > &  bias,
tensor  stride = { 1, 1, 1, 1 },
tensor  input_offset = { 0,0,0,0 },
bool  with_activation = false,
float  activation_slp = 0.0f,
const padding output_padding = padding() 
)
inline

Constructs deconvolution primitive.

Parameters
idThis primitive id.
inputInput primitive id.
weightsList of primitive ids containing weights data.
biasList of primitive ids containing bias data. Provide empty vector if using next parameters without bias.
input_offsetInput padding/offset.
strideDefines shift in input buffer between adjacent calculations of output values.
with_activationEnables Relu activation.
activation_slpRelu activation slope.

Definition at line 47 of file deconvolution.hpp.

◆ deconvolution() [2/4]

cldnn::deconvolution::deconvolution ( const primitive_id id,
const primitive_id input,
const std::vector< primitive_id > &  weights,
tensor  stride = { 1, 1, 1, 1 },
tensor  input_offset = { 0,0,0,0 },
bool  with_activation = false,
float  activation_slp = 0.0f,
const padding output_padding = padding() 
)
inline

Constructs deconvolution primitive (w/o bias).

Parameters
idThis primitive id.
inputInput primitive id.
weightsList of primitive ids containing weights data.
input_offsetInput padding/offset.
strideDefines shift in input buffer between adjacent calculations of output values.
with_activationEnables Relu activation.
activation_slpRelu activation slope.

Definition at line 79 of file deconvolution.hpp.

◆ deconvolution() [3/4]

cldnn::deconvolution::deconvolution ( const primitive_id id,
const primitive_id input,
const std::vector< primitive_id > &  weights,
const std::vector< primitive_id > &  bias,
tensor  stride,
tensor  input_offset,
bool  with_activation,
float  activation_slp,
tensor  output_size,
const padding output_padding = padding() 
)
inline

Constructs deconvolution primitive (computes input paddings to match output size).

Parameters
idThis primitive id.
inputInput primitive id.
weightsList of primitive ids containing weights data.
biasList of primitive ids containing bias data. Provide empty vector if using next parameters without bias.
input_offsetInput padding/offset.
strideDefines shift in input buffer between adjacent calculations of output values.
with_activationEnables Relu activation.
activation_slpRelu activation slope.
output_sizeUser-defined output data size of the primitive (w/o padding).

Definition at line 112 of file deconvolution.hpp.

◆ deconvolution() [4/4]

cldnn::deconvolution::deconvolution ( const primitive_id id,
const primitive_id input,
const std::vector< primitive_id > &  weights,
tensor  stride,
tensor  input_offset,
bool  with_activation,
float  activation_slp,
tensor  output_size,
const padding output_padding = padding() 
)
inline

Constructs deconvolution primitive (w/o bias, computes input paddings to match output size).

Parameters
idThis primitive id.
inputInput primitive id.
weightsList of primitive ids containing weights data.
input_offsetInput padding/offset.
strideDefines shift in input buffer between adjacent calculations of output values.
with_activationEnables Relu activation.
activation_slpRelu activation slope.
output_sizeUser-defined output data size of the primitive (w/o padding).

Definition at line 147 of file deconvolution.hpp.

Member Function Documentation

◆ create_with_output_size() [1/2]

static deconvolution cldnn::deconvolution::create_with_output_size ( const primitive_id id,
const primitive_id input,
const std::vector< primitive_id > &  weights,
const std::vector< primitive_id > &  bias,
tensor  output_size,
tensor  stride = { 1, 1, 1, 1 },
tensor  input_offset = { 0,0,0,0 },
bool  with_activation = false,
float  activation_slp = 0.0f,
const padding output_padding = padding() 
)
inlinestatic

Constructs deconvolution primitive (computes input paddings to match output size).

Parameters
idThis primitive id.
inputInput primitive id.
weightsList of primitive ids containing weights data.
biasList of primitive ids containing bias data. Provide empty vector if using next parameters without bias.
input_offsetInput padding/offset.
strideDefines shift in input buffer between adjacent calculations of output values.
with_activationEnables Relu activation.
activation_slpRelu activation slope.
output_sizeUser-defined output data size of the primitive (w/o padding).
Returns
Deconvolution primitive with specified settings.

Definition at line 201 of file deconvolution.hpp.

◆ create_with_output_size() [2/2]

static deconvolution cldnn::deconvolution::create_with_output_size ( const primitive_id id,
const primitive_id input,
const std::vector< primitive_id > &  weights,
tensor  output_size,
tensor  stride = { 1, 1, 1, 1 },
tensor  input_offset = { 0,0,0,0 },
bool  with_activation = false,
float  activation_slp = 0.0f,
const padding output_padding = padding() 
)
inlinestatic

Constructs deconvolution primitive (w/o bias; computes input paddings to match output size).

Parameters
idThis primitive id.
inputInput primitive id.
weightsList of primitive ids containing weights data.
input_offsetInput padding/offset.
strideDefines shift in input buffer between adjacent calculations of output values.
with_activationEnables Relu activation.
activation_slpRelu activation slope.
output_sizeUser-defined output data size of the primitive (w/o padding).
Returns
Deconvolution primitive with specified settings.

Definition at line 228 of file deconvolution.hpp.


The documentation for this struct was generated from the following file: