|
|
|
@ -34,26 +34,72 @@ const std::map<std::string, OperatorType> DictOpType{
|
|
|
|
|
{MAXPOOL, OperatorType::kRecPooling},
|
|
|
|
|
{MAXPOOLV2, OperatorType::kRecPooling},
|
|
|
|
|
{SIMPLE_MEAN, OperatorType::kRecPooling},
|
|
|
|
|
{TENSOR_ADD, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{RESHAPE, OperatorType::kRecReshape},
|
|
|
|
|
{BIAS_ADD, OperatorType::kRecBiasAdd},
|
|
|
|
|
{RELU, OperatorType::kRecReLU},
|
|
|
|
|
{BATCH_NORM, OperatorType::kRecBatchNorm},
|
|
|
|
|
{FUSE_BATCH_NORM, OperatorType::kRecBatchNorm},
|
|
|
|
|
{SOFTMAX_CROSS_ENTROPY_WITH_LOGITS, OperatorType::kRecSparseSoftmaxCrossEntropyWithLogits},
|
|
|
|
|
{SPARSE_SOFTMAX_CROSS_ENTROPY_WITH_LOGITS, OperatorType::kRecSparseSoftmaxCrossEntropyWithLogits},
|
|
|
|
|
{ONEHOT, OperatorType::kRecOneHot},
|
|
|
|
|
{LOG, OperatorType::kRecLog},
|
|
|
|
|
{EXP, OperatorType::kRecExp},
|
|
|
|
|
{SUB, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{MUL, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{DIV, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{SQUEEZE, OperatorType::kRecSqueeze},
|
|
|
|
|
{CAST, OperatorType::kRecCast},
|
|
|
|
|
{REDUCE_SUM, OperatorType::kRecReduce},
|
|
|
|
|
{REDUCE_MAX, OperatorType::kRecReduce},
|
|
|
|
|
{REDUCE_MIN, OperatorType::kRecReduce},
|
|
|
|
|
{REDUCE_MEAN, OperatorType::kRecReduce}};
|
|
|
|
|
{REDUCE_MEAN, OperatorType::kRecReduce},
|
|
|
|
|
|
|
|
|
|
{RELU, OperatorType::kRecReLU},
|
|
|
|
|
{"ReLU6", OperatorType::kRecReLU},
|
|
|
|
|
{"ReLUV2", OperatorType::kRecReLU},
|
|
|
|
|
{SIGMOID, OperatorType::kRecReLU},
|
|
|
|
|
{SIGMOID_CROSS_ENTROPY_WITH_LOGITS, OperatorType::kRecReLU},
|
|
|
|
|
{"HSigmoid", OperatorType::kRecReLU},
|
|
|
|
|
{GELU, OperatorType::kRecReLU},
|
|
|
|
|
{TANH, OperatorType::kRecReLU},
|
|
|
|
|
|
|
|
|
|
{TENSOR_ADD, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{SUB, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{MUL, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{DIV, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{REAL_DIV, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{SOFTMAX, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{LOG_SOFTMAX, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{SOFTMAX_CROSS_ENTROPY_WITH_LOGITS, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{SQRT, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{NEG, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{POW, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{EXP, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{LOG, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{COS, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{ACOS, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{LOGICALNOT, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"LogicalAnd", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"LogicalOr", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{SQUARE, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Abs", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Acosh", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"AddN", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Atan2", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Erf", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Floor", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{FLOORDIV, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"FloorMod", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{GREATER, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"GreaterEqual", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"HSwish", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Less", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"LessEqual", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{MAXIMUM, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{MINIMUM, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{EQUAL, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{NOT_EQUAL, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Reciprocal", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Round", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Rsqrt", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Sign", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"Sin", OperatorType::kRecElmWiseOp},
|
|
|
|
|
{ASSIGN, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{ASSIGN_SUB, OperatorType::kRecElmWiseOp},
|
|
|
|
|
{"AssignAdd", OperatorType::kRecElmWiseOp}};
|
|
|
|
|
|
|
|
|
|
const TensorParam MakeTensor(int n, int c, int h, int w);
|
|
|
|
|
|
|
|
|
|