clDNN
cldnn::scale Struct Reference

Performs elementwise product of input and scale_input. More...

#include <scale.hpp>

Inheritance diagram for cldnn::scale:
Collaboration diagram for cldnn::scale:

Public Types

typedef cldnn_scale_desc dto
 

Public Member Functions

 scale (const primitive_id &id, const primitive_id &input, const primitive_id &scale_input, const padding &output_padding=padding())
 Constructs scale primitive without adding bias. More...
 
 scale (const primitive_id &id, const primitive_id &input, const primitive_id &scale_input, const primitive_id &bias, const padding &output_padding=padding())
 Constructs scale primitive with optional adding bias. More...
 
 scale (const dto *dto)
 Constructs a copy from C API cldnn_scale_desc.
 
- Public Member Functions inherited from cldnn::primitive_base< scale, cldnn_scale_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 ()
 

Public Attributes

primitive_id bias
 Primitive id containing bias data.
 
- 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< scale, cldnn_scale_desc >
 primitive_base (const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive_base (const cldnn_scale_desc *dto)
 

Additional Inherited Members

- Protected Attributes inherited from cldnn::primitive
primitive_id_arr _input
 

Detailed Description

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 eltwise 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 providing bias data.

Definition at line 44 of file scale.hpp.

Constructor & Destructor Documentation

◆ scale() [1/2]

cldnn::scale::scale ( const primitive_id id,
const primitive_id input,
const primitive_id scale_input,
const padding output_padding = padding() 
)
inline

Constructs scale primitive without adding bias.

Parameters
idThis primitive id.
inputInput primitive id.
scale_inputScale input primitive id with values needed for product computation.

Definition at line 52 of file scale.hpp.

◆ scale() [2/2]

cldnn::scale::scale ( const primitive_id id,
const primitive_id input,
const primitive_id scale_input,
const primitive_id bias,
const padding output_padding = padding() 
)
inline

Constructs scale primitive with optional adding bias.

Parameters
idThis primitive id.
inputInput primitive id.
scale_inputScale input primitive id with values needed for product computation.
biasPrimitive id containing bias data.

Definition at line 68 of file scale.hpp.


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