Class Conv2dTransposeFusion

Inheritance Relationships

Base Type

Class Documentation

class Conv2dTransposeFusion : public mindspore::ops::Conv2DTranspose

Conv2dTransposeFusion defined Conv2dTranspose operator prototype of lite.

Public Functions

inline Conv2dTransposeFusion()

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}, const std::vector<int64_t> &dilation = {1, 1}, int64_t group = 1, const Format &format = NCHW, const std::vector<int64_t> &pad_list = {0, 0, 0, 0}, const std::vector<int64_t> &output_paddings = {0}, 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-transpose.

  • 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.

  • output_paddings[in] Define the additional elements added to the side with higher coordinate indices in the output, which is used to control the selection-range of the output tensor.

  • activation_type[in] Define the activation type.

virtual void set_kernel_size(const std::vector<int64_t> &kernel_size) override

Method to set kernel_size attribute.

Parameters

kernel_size[in] Define the size of the filter kernel.

virtual void set_dilation(const std::vector<int64_t> &dilation) override

Method to set dilation attribute.

Parameters

dilation[in] Define the coefficient of expansion of the filter kernel, which is useful for dilated convolution-transpose.

void set_output_paddings(const std::vector<int64_t> &output_paddings)

Method to set output_paddings attribute.

Parameters

output_paddings[in] Define the additional elements added to the side with higher coordinate indices in the output, which is used to control the selection-range of the output tensor.

void set_activation_type(ActivationType activation_type)

Method to set activation type.

Parameters

activation_type[in] Define the activation type.

std::vector<int64_t> get_output_paddings() const

Method to get output_paddings attribute.

Returns

output_paddings value.

ActivationType get_activation_type() const

Method to get activation type.

Returns

activation type.