/**
* @brief Make a value visible to user
*/
-class Push /* to user */ final : public FixedArityNode<1>, public NodeMixin<NodeTrait::TensorShape>
+class Push /* to user */ final : public FixedArityNode<1, Node>,
+ public NodeMixin<NodeTrait::TensorShape>
{
public:
Push() = default;
/**
* @brief Create a value from user data
*/
-class Pull /* from user */ final : public FixedArityNode<0>,
+class Pull /* from user */ final : public FixedArityNode<0, Node>,
public NodeMixin<NodeTrait::DataType>,
public NodeMixin<NodeTrait::TensorShape>
{
*
* This node may encode memory transfer (such as CPU -> GPU or GPU -> CPU)
*/
-class Forward final : public FixedArityNode<1>
+class Forward final : public FixedArityNode<1, Node>
{
public:
Forward() = default;
/**
* @brief Create a new value that rectifies its input
*/
-class ReLU final : public FixedArityNode<1>
+class ReLU final : public FixedArityNode<1, Node>
{
public:
ReLU() = default;
* return res;
* }
*/
-class ConstGen final : public FixedArityNode<0>,
+class ConstGen final : public FixedArityNode<0, Node>,
public NodeMixin<NodeTrait::DataType>,
public NodeMixin<NodeTrait::TensorShape>
{
* before/after MaxPool2D node according to the semantics of the corresponding NN framework.
* ---
*/
-struct MaxPool2D final : public FixedArityNode<1>
+struct MaxPool2D final : public FixedArityNode<1, Node>
{
public:
Node *ifm(void) const { return at(0)->node(); }
/**
* @brief Create a feature map from a tensor
*/
-class FeatureEncode final : public FixedArityNode<1>
+class FeatureEncode final : public FixedArityNode<1, Node>
{
public:
Node *input(void) const { return at(0)->node(); }
/**
* @brief Create a tensor from a feature map
*/
-class FeatureDecode final : public FixedArityNode<1>
+class FeatureDecode final : public FixedArityNode<1, Node>
{
public:
Node *input(void) const { return at(0)->node(); }
/**
* @brief Create a filter from a tensor
*/
-class FilterEncode final : public FixedArityNode<1>
+class FilterEncode final : public FixedArityNode<1, Node>
{
public:
Node *input(void) const { return at(0)->node(); }
* input[1, 1, 1, 1] => output [3, 3]
*/
template <>
-class Reshape<ReshapeType::Fixed> final : public FixedArityNode<1>,
+class Reshape<ReshapeType::Fixed> final : public FixedArityNode<1, Node>,
public NodeMixin<NodeTrait::TensorShape>
{
public:
* Given an axis, TensorConcat takes as input two tensors and produces a tensor
* concatenated along the given axis.
*/
-class TensorConcat final : public FixedArityNode<2>
+class TensorConcat final : public FixedArityNode<2, Node>
{
public:
Node *lhs(void) const { return at(0)->node(); }
/**
* @brief 2D Spatial Convolution
*/
-class Conv2D final : public FixedArityNode<2>
+class Conv2D final : public FixedArityNode<2, Node>
{
public:
Node *ifm(void) const { return at(0)->node(); }