Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
add property
Browse files Browse the repository at this point in the history
  • Loading branch information
antinucleon committed Jun 21, 2015
1 parent 7a1296d commit 4d175e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/mxnet/operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ class Operator {
/*! \brief bias argument */
kBiasArg = 2
};
enum Property {
/*! \brief Op contains interanl state, won't influence engine schedule */
kContainInteralState = 1,
/*! \brief Op forward require random number, will influence engine schedule */
kForwardRequireRnd = 2,
};
/*!
* \brief get types of input argument of this oeprator
* \return a vector corresponding to type of each argument
Expand All @@ -56,6 +62,14 @@ class Operator {
// default most of layers only have one data argument
return std::vector<ArgType>(1, kDataArg);
}
/*!
* \brief describe property of op
* \return a bit map in int
*/
virtual int DescribeProperty() const {
// default most of layer only conatin internal state
return kContainInteralState;
}
/*!
* \brief set param for the operator from string
* \param name parameter name
Expand Down

0 comments on commit 4d175e4

Please sign in to comment.