Add FullyConnected layer desсription class (#285)
authorVladimir Plazun/AI Tools Lab/Engineer/삼성전자 <v.plazun@partner.samsung.com>
Fri, 1 Jun 2018 14:24:07 +0000 (18:24 +0400)
committerSergey Vostokov/AI Tools Lab/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Fri, 1 Jun 2018 14:24:07 +0000 (17:24 +0300)
Add FullyConnected layer desсription class

This class is used to represent a fully connected layer in computation graph

Signed-off-by: Vladimir Plazun <v.plazun@partner.samsung.com>
contrib/nnc/libs/core/include/nnc/core/IR/model/operations/fully_connected_op.h [new file with mode: 0644]

diff --git a/contrib/nnc/libs/core/include/nnc/core/IR/model/operations/fully_connected_op.h b/contrib/nnc/libs/core/include/nnc/core/IR/model/operations/fully_connected_op.h
new file mode 100644 (file)
index 0000000..9670797
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef _NNC_CORE_IR_MODEL_FULLY_CONNECTED_OP_H_
+#define _NNC_CORE_IR_MODEL_FULLY_CONNECTED_OP_H_
+
+#include "nnc/core/IR/model/operations/operation.h"
+#include "nnc/core/linalg/TensorVariant.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace core
+{
+namespace IR
+{
+namespace model
+{
+namespace ops
+{
+
+class FullyConnectedOp : public OpDescription
+{
+public:
+  explicit FullyConnectedOp(const ADT::TensorVariant &weights) : OpDescription(1, 1), _weights(weights) {}
+
+  const ADT::TensorVariant &getWeights() const { return _weights; }
+
+private:
+  ADT::TensorVariant _weights;
+};
+
+} // namespace ops
+} // namespace model
+} // namespace IR
+} // namespace core
+} // namespace contrib
+} // namespace nncc
+
+#endif //_NNC_CORE_IR_MODEL_FULLY_CONNECTED_OP_H_