Class Crop
Defined in File crop.h
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.
- Parameters
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.
- Parameters
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.
- Parameters
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.
- Returns
a dim which indicates the first dimension to slice.
-
std::vector<int64_t> get_offsets() const
Method to get offsets attribute.
- Returns
a vector which indicates the start index to slice on the corresponding axis.
-
inline Crop()