Browse Source

add instruction

tags/v1.6.0
yefeng 4 years ago
parent
commit
6923150b7a
4 changed files with 48 additions and 0 deletions
  1. +17
    -0
      mindspore/core/ops/all.h
  2. +17
    -0
      mindspore/core/ops/assert.h
  3. +7
    -0
      mindspore/core/ops/partial.h
  4. +7
    -0
      mindspore/core/ops/switch.h

+ 17
- 0
mindspore/core/ops/all.h View File

@@ -23,13 +23,30 @@
namespace mindspore {
namespace ops {
constexpr auto kNameAll = "All";
/// \brief All defined All operator prototype of lite.
class MS_CORE_API All : public PrimitiveC {
public:
/// \brief Constructor.
All() : PrimitiveC(kNameAll) {}

/// \brief Destructor.
~All() = default;

MS_DECLARE_PARENT(All, PrimitiveC);

/// \brief Method to init the op's attributes.
///
/// \param[in] keep_dims Define the dim.
void Init(const int64_t keep_dims);

/// \brief Method to set keep_dims attributes.
///
/// \param[in] keep_dims Define the dim.
void set_keep_dims(const int64_t keep_dims);

/// \brief Method to get keep_dims attributes.
///
/// \return keep_dims attributes.
int64_t get_keep_dims() const;
};
} // namespace ops


+ 17
- 0
mindspore/core/ops/assert.h View File

@@ -25,13 +25,30 @@
namespace mindspore {
namespace ops {
constexpr auto kNameAssert = "Assert";
/// \brief Assert defined Assert operator prototype of lite.
class MS_CORE_API Assert : public PrimitiveC {
public:
/// \brief Constructor.
Assert() : PrimitiveC(kNameAssert) {}

/// \brief Destructor.
~Assert() = default;

MS_DECLARE_PARENT(Assert, PrimitiveC);

/// \brief Method to init the op's attributes.
///
/// \param[in] summarize Define print the number of each tensor.
void Init(const int64_t summarize = 3);

/// \brief Method to set summarize attributes.
///
/// \param[in] summarize Define print the number of each tensor.
void set_summarize(const int64_t summarize);

/// \brief Method to get summarize attributes.
///
/// \return summarize attributes.
int64_t get_summarize() const;
};



+ 7
- 0
mindspore/core/ops/partial.h View File

@@ -23,11 +23,18 @@
namespace mindspore {
namespace ops {
constexpr auto kNamePartial = "Partial";
/// \brief Partial defined Partial operator prototype of lite.
class MS_CORE_API Partial : public PrimitiveC {
public:
/// \brief Constructor.
Partial() : PrimitiveC(kNamePartial) {}

/// \brief Destructor.
~Partial() = default;

MS_DECLARE_PARENT(Partial, PrimitiveC);

/// \brief Method to init the op's attributes.
void Init() {}
};
} // namespace ops


+ 7
- 0
mindspore/core/ops/switch.h View File

@@ -23,11 +23,18 @@
namespace mindspore {
namespace ops {
constexpr auto kNameSwitch = "Switch";
/// \brief Switch defined Switch operator prototype of lite.
class MS_CORE_API Switch : public PrimitiveC {
public:
/// \brief Constructor.
Switch() : PrimitiveC(kNameSwitch) {}

/// \brief Destructor.
~Switch() = default;

MS_DECLARE_PARENT(Switch, PrimitiveC);

/// \brief Method to init the op's attributes.
void Init() {}
};
} // namespace ops


Loading…
Cancel
Save