19 #include "../C/deconvolution.h" 20 #include "primitive.hpp" 50 const std::vector<primitive_id>&
weights,
51 const std::vector<primitive_id>&
bias,
55 float activation_slp = 0.0f,
82 const std::vector<primitive_id>&
weights,
86 float activation_slp = 0.0f,
98 , _bias(std::vector<primitive_id>(0))
115 const std::vector<primitive_id>&
weights,
116 const std::vector<primitive_id>&
bias,
120 float activation_slp,
126 ,
bias(_bias.cpp_ids)
150 const std::vector<primitive_id>&
weights,
154 float activation_slp,
160 ,
bias(_bias.cpp_ids)
168 , _bias(std::vector<primitive_id>(0))
176 ,
bias(_bias.cpp_ids)
187 throw std::invalid_argument(
"Invalid deconvolution dto: bad split value");
204 const std::vector<primitive_id>&
weights,
205 const std::vector<primitive_id>&
bias,
210 float activation_slp = 0.0f,
231 const std::vector<primitive_id>&
weights,
236 float activation_slp = 0.0f,
265 primitive_id_arr _weights;
266 primitive_id_arr _bias;
268 std::vector<std::reference_wrapper<const primitive_id>> get_dependencies()
const override 270 std::vector<std::reference_wrapper<const primitive_id>> ret;
280 void update_dto(dto& dto)
const override 282 dto.weights = _weights.ref();
283 dto.bias = _bias.ref();
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).
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).
Performs transposed convolution. Also supports built-in Relu activation available by setting it in ar...
fixed_size_vector_ref bias
List of primitive ids containing bias data.
Represents data padding information.
tensor stride
Defines shift in input buffer between adjacent calculations of output values.
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).
tensor output_size
User-defined output data size of the primitive (w/o padding).
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.
deconvolution(const dto *dto)
Constructs a copy from C API cldnn_deconvolution_desc.
N-dimensional vector. Mostly used to represent memory size.
Performs transposed convolution. Also supports built-in Relu cldnn_activation_desc available by setti...
int32_t split() const
On how many cards split the computation to.
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)...
const primitive_id id
Primitive's id.
tensor input_offset
Defines a shift, relative to (0,0) position of the input buffer, where (0,0) point of the deconvoluti...
fixed_size_vector_ref weights
List of primitive ids containing weights data.
float activation_negative_slope
Relu activation slope.
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)...
bool with_output_size
Indicates that the primitive has user-defined output size (non-zero value).
std::string primitive_id
Unique id of a primitive within a topology.
uint32_t split
On how many cards split the computation to.
fixed_size_vector_ref input
List of ids of input primitives.
base class for all primitives implementations.
padding output_padding
Requested output padding.
Initialize fields common for all primitives.
bool with_activation
Enables Relu activation.