Skip to content

Commit

Permalink
Remove redundant shaper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed Jul 31, 2019
1 parent 848b29f commit cf9c566
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 28 deletions.
12 changes: 0 additions & 12 deletions common/Shaper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ void Shaper::Conv(const std::string &input_name,
paddings[1], paddings[3], paddings[0], paddings[2],
weight_name, output_name);
}

void Shaper::Conv(const std::string &input_name,
const std::vector<int32_t> paddings,
const std::vector<int32_t> strides,
const std::vector<int32_t> dilations,
const std::string &weight_name, const std::string &bias_name,
const std::string &output_name) {
(void)bias_name;
Shaper::Conv(input_name, strides, dilations, paddings, weight_name,
output_name);
}

void Shaper::Conv(const std::string &input, const std::string &weight,
int32_t padding_left, int32_t padding_right,
int32_t padding_top, int32_t padding_bottom, int32_t stride_x,
Expand Down
27 changes: 11 additions & 16 deletions include/common/Shaper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ class Shaper {

static len_t total(const Shape &shape);

void Conv(const std::string &input_name,
const std::string &weight_name,
const std::vector<int32_t> strides,
const std::vector<int32_t> paddings,
const std::string &output_name);
void Conv(const std::string &input_name, const std::string &weight_name,
const std::vector<int32_t> strides,
const std::vector<int32_t> paddings,
const std::string &output_name);
void Conv(const std::string &input_name, const std::vector<int32_t> strides,
const std::vector<int32_t> dilations,
const std::vector<int32_t> paddings,
Expand All @@ -28,11 +27,6 @@ class Shaper {
int32_t padding_left, int32_t padding_right, int32_t padding_top,
int32_t padding_bottom, int32_t stride_x, int32_t stride_y,
const std::string &output);
void Conv(const std::string &input_name, const std::vector<int32_t> strides,
const std::vector<int32_t> dilations,
const std::vector<int32_t> paddings,
const std::string &weight_name, const std::string &bias_name,
const std::string &output_name);
void Conv(const std::string &input_name, int32_t strideX, int32_t strideY,
int32_t dilationX, int32_t dilationY, int32_t paddingLeft,
int32_t paddingRight, int32_t paddingTop, int32_t paddingBottom,
Expand Down Expand Up @@ -66,11 +60,11 @@ class Shaper {
int32_t endMask, int32_t shrinkAxisMask,
const std::string &output_name);
void Pool(const std::string &input_name, int32_t padding_left,
int32_t padding_right, int32_t padding_top,
int32_t padding_bottom, int32_t stride_x, int32_t stride_y,
int32_t width, int32_t height,
const std::string &output_name);
void Pool(const std::string &input_name, const std::vector<int32_t> kernel_shape,
int32_t padding_right, int32_t padding_top,
int32_t padding_bottom, int32_t stride_x, int32_t stride_y,
int32_t width, int32_t height, const std::string &output_name);
void Pool(const std::string &input_name,
const std::vector<int32_t> kernel_shape,
const std::vector<int32_t> pads,
const std::vector<int32_t> strides,
const std::string &output_name);
Expand All @@ -88,7 +82,8 @@ class Shaper {
void Affine(const std::string &input_name, const std::string &output_name);
void Affine(const std::string &input_name, const std::string &a,
const std::string &b, const std::string &output_name);
void Identity(const std::string &input_name, const std::string &output_name);
void Identity(const std::string &input_name,
const std::string &output_name);
void BatchToSpace(const std::string &input_name,
const std::vector<int32_t> &block_sizes,
const std::string &output_name);
Expand Down

0 comments on commit cf9c566

Please sign in to comment.