Class Crop

Inheritance Relationships

Base Type

  • public mindspore::ops::BaseOperator

Class Documentation

class Crop : public mindspore::ops::BaseOperator

Crop defined the Crop operator prototype of lite, which can be replaced by slice operator.

Public Functions

inline Crop()

Constructor.

void Init(const int64_t axis, const std::vector<int64_t> &offsets)

Method to init the op’s attributes.

参数
  • axis[in] Define a dim which is the first dimension to slice.

  • offsets[in] Define a vector to indicate the start index to slice on the corresponding axis.

void set_axis(const int64_t axis)

Method to set axis attribute.

参数

axis[in] Define a dim which is the first dimension to slice.

void set_offsets(const std::vector<int64_t> &offsets)

Method to set offsets attribute.

参数

offsets[in] Define a vector to indicate the start index to slice on the corresponding axis.

int64_t get_axis() const

Method to get axis attribute.

返回

a dim which indicates the first dimension to slice.

std::vector<int64_t> get_offsets() const

Method to get offsets attribute.

返回

a vector which indicates the start index to slice on the corresponding axis.