Program Listing for File affine.h

Return to documentation for file (include/converter/include/ops/affine.h)

#ifndef MINDSPORE_CORE_OPS_AFFINE_H_
#define MINDSPORE_CORE_OPS_AFFINE_H_
#include <string>
#include <vector>
#include "mindapi/base/types.h"
#include "ops/base_operator.h"

namespace mindspore {
namespace ops {
constexpr auto kNameAffine = "Affine";
constexpr auto kAffineContext = "context";
constexpr auto kAffineOutputDim = "output_dim";

class MIND_API Affine : public BaseOperator {
 public:
  MIND_API_BASE_MEMBER(Affine);
  Affine() : BaseOperator(kNameAffine) { InitIOName({"x1", "x2"}, {"outputs"}); }
  void Init(const std::vector<int64_t> &contexts, int64_t output_dim, bool transpose_a = false,
            bool transpose_b = false);
  void set_context(const std::vector<int64_t> &);
  void set_output_dim(int64_t output_dim);
  void set_transpose_a(bool transpose_a);
  void set_transpose_b(bool transpose_b);
  void set_activation_type(const ActivationType &activation_type);

  bool get_transpose_a() const;
  bool get_transpose_b() const;
  std::vector<int64_t> get_context() const;
  int64_t get_output_dim() const;
  ActivationType get_activation_type() const;
};
}  // namespace ops
}  // namespace mindspore

#endif  // MINDSPORE_CORE_OPS_AFFINE_H_