Commit 7c9269c2 authored by Scott Cyphers's avatar Scott Cyphers

Merge issues

parent fcf59b2a
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
using namespace std; using namespace std;
using namespace ngraph; using namespace ngraph;
constexpr NodeTypeInfo op::Softmax::type_info; // *** SOFTMAX OP SET 0 ***
constexpr NodeTypeInfo op::v0::Softmax::type_info;
op::v0::Softmax::Softmax(const Output<Node>& arg, const AxisSet& axes) op::v0::Softmax::Softmax(const Output<Node>& arg, const AxisSet& axes)
: Op({arg}) : Op({arg})
...@@ -106,7 +107,7 @@ void op::v0::Softmax::generate_adjoints(autodiff::Adjoints& adjoints, const Node ...@@ -106,7 +107,7 @@ void op::v0::Softmax::generate_adjoints(autodiff::Adjoints& adjoints, const Node
} }
// *** SOFTMAX OP SET V1 *** // *** SOFTMAX OP SET V1 ***
const string op::v1::Softmax::type_name{"Softmax"}; constexpr NodeTypeInfo op::v1::Softmax::type_info;
op::v1::Softmax::Softmax(const Output<Node>& arg, const size_t axis) op::v1::Softmax::Softmax(const Output<Node>& arg, const size_t axis)
: Op({arg}) : Op({arg})
......
...@@ -24,18 +24,14 @@ namespace ngraph ...@@ -24,18 +24,14 @@ namespace ngraph
{ {
namespace v0 namespace v0
{ {
public: /// \brief Softmax operation.
NGRAPH_API ///
static constexpr NodeTypeInfo type_info{"Softmax", 0};
const NodeTypeInfo& get_type_info() const override { return type_info; }
Softmax() = default;
/// \brief Constructs a softmax operation.
class Softmax : public Op class Softmax : public Op
{ {
public: public:
NGRAPH_API NGRAPH_API
static const std::string type_name; static constexpr NodeTypeInfo type_info{"Softmax", 0};
const std::string& description() const override { return type_name; } const NodeTypeInfo& get_type_info() const override { return type_info; }
Softmax() = default; Softmax() = default;
/// \brief Constructs a softmax operation. /// \brief Constructs a softmax operation.
/// ///
...@@ -67,8 +63,8 @@ namespace ngraph ...@@ -67,8 +63,8 @@ namespace ngraph
{ {
public: public:
NGRAPH_API NGRAPH_API
static const std::string type_name; static constexpr NodeTypeInfo type_info{"Softmax", 1};
const std::string& description() const override { return type_name; } const NodeTypeInfo& get_type_info() const override { return type_info; }
Softmax() Softmax()
: m_axis(0) : m_axis(0)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment