Class Affine

Inheritance Relationships

Base Type

  • public mindspore::ops::BaseOperator

Class Documentation

class Affine : public mindspore::ops::BaseOperator

Assert defined Affine operator prototype of lite.

Public Functions

inline Affine()

Constructor.

void Init(const std::vector<int64_t> &contexts, int64_t output_dim, bool transpose_a = false, bool transpose_b = false)

Method to init the op’s attributes.

void set_context(const std::vector<int64_t>&)

Method to set context attributes.

参数

keep_dims[in] Define the context.

void set_output_dim(int64_t output_dim)

Method to set output_dim attributes.

参数

output_dim[in] Define the output dim.

void set_transpose_a(bool transpose_a)

Method to set transpose_a attributes.

参数

transpose_b[in] Define the if transpose a tensor.

void set_transpose_b(bool transpose_b)

Method to set transpose_b attributes.

参数

transpose_b[in] Define the if transpose b tensor.

void set_activation_type(const ActivationType &activation_type)

Method to set activation_type attributes.

参数

activation_type[in] Define the activation type.

bool get_transpose_a() const

Method to get transpose_a attributes.

bool get_transpose_b() const

Method to get transpose_b attributes.

std::vector<int64_t> get_context() const

Method to get context attributes.

int64_t get_output_dim() const

Method to get output_dim attributes.

ActivationType get_activation_type() const

Method to get activation_type attributes.