Class Conv2DFusion
Defined in File conv2d_fusion.h
Inheritance Relationships
Base Type
public mindspore::ops::Conv2D
(Class Conv2D)
Class Documentation
-
class Conv2DFusion : public mindspore::ops::Conv2D
Conv2DFusion defined Conv2D operator prototype of lite.
Public Functions
-
inline Conv2DFusion()
Constructor.
-
void Init(int64_t in_channel, int64_t out_channel, const std::vector<int64_t> &kernel_size, int64_t mode = 1, const PadMode &pad_mode = VALID, const std::vector<int64_t> &pad = {0, 0, 0, 0}, const std::vector<int64_t> &stride = {1, 1, 1, 1}, const std::vector<int64_t> &dilation = {1, 1, 1, 1}, int64_t group = 1, const Format &format = NCHW, const std::vector<int64_t> &pad_list = {0, 0, 0, 0}, const ActivationType &activation_type = NO_ACTIVATION)
Method to init the op’s attributes.
- Parameters
in_channel – [in] Define the number of input channel.
out_channel – [in] Define the number of output channel.
kernel_size – [in] Define the size of the filter kernel.
mode – [in] Define the category of conv, which is useless on lite.
pad_mode – [in] Define the padding method.
pad – [in] Define the concrete padding value on H and W dimension, which is replaced with pad_list.
stride – [in] Define the moving size of the filter kernel.
dilation – [in] Define the coefficient of expansion of the filter kernel, which is useful for dilated convolution.
group – [in] Define the number of group.
format – [in] Define the format of input tensor.
pad_list – [in] Define the concrete padding value on H and W dimension.
activation_type – [in] Define the activation type.
-
void set_in_channel(const int64_t in_channel)
Method to set in_channel attribute.
- Parameters
in_channel – [in] Define the number of input channel.
-
void set_pad_list(const std::vector<int64_t> &pad_list)
Method to set pad_list attribute.
- Parameters
pad_list – [in] Define the concrete padding value on H and W dimension.
-
void set_activation_type(const ActivationType &activation_type)
Method to set activation type.
- Parameters
activation_type – [in] Define the activation type.
-
int64_t get_in_channel() const
Method to get in_channel attribute.
- Returns
the number of input channel.
-
std::vector<int64_t> get_pad_list() const
Method to get pad_list attribute.
- Returns
padding value.
-
ActivationType get_activation_type() const
Method to get activation type.
- Returns
activation type.
-
inline Conv2DFusion()