Home
last modified time | relevance | path

Searched refs:OperatorType (Results 1 – 25 of 78) sorted by relevance

1234

/external/tensorflow/tensorflow/contrib/lite/toco/
Dmodel.h32 enum class OperatorType { enum
278 const OperatorType type;
303 explicit Operator(OperatorType t)
355 ConvOperator() : Operator(OperatorType::kConv) {}
375 DepthwiseConvOperator() : Operator(OperatorType::kDepthwiseConv) {}
389 DepthToSpaceOperator() : Operator(OperatorType::kDepthToSpace) {}
400 SpaceToDepthOperator() : Operator(OperatorType::kSpaceToDepth) {}
415 FullyConnectedOperator() : Operator(OperatorType::kFullyConnected) {}
442 DequantizeOperator() : Operator(OperatorType::kDequantize) {}
463 : Operator(OperatorType::kBatchNormalization),
[all …]
Dexport_tensorflow.cc322 CHECK(op->type == OperatorType::kFakeQuant); in WalkUpToConstantArray()
683 providing_op->type == OperatorType::kTensorFlowReshape) { in ConvertSoftmaxOperator()
723 if (providing_op->type == OperatorType::kTensorFlowReshape) { in ConvertLogSoftmaxOperator()
1602 if (src_op.type == OperatorType::kConv) { in ConvertOperator()
1605 } else if (src_op.type == OperatorType::kDepthwiseConv) { in ConvertOperator()
1609 } else if (src_op.type == OperatorType::kDepthToSpace) { in ConvertOperator()
1613 } else if (src_op.type == OperatorType::kSpaceToDepth) { in ConvertOperator()
1617 } else if (src_op.type == OperatorType::kFullyConnected) { in ConvertOperator()
1621 } else if (src_op.type == OperatorType::kAdd) { in ConvertOperator()
1624 } else if (src_op.type == OperatorType::kAddN) { in ConvertOperator()
[all …]
Dtooling_util.cc235 const char* OperatorTypeName(OperatorType type) { in OperatorTypeName()
238 case OperatorType::k##c: \ in OperatorTypeName()
326 if (op.type == OperatorType::kTensorFlowUnsupported) { in HelpfulOperatorTypeName()
334 bool OperatorSupportsFusedActivation(OperatorType type) { in OperatorSupportsFusedActivation()
336 case OperatorType::kConcatenation: in OperatorSupportsFusedActivation()
337 case OperatorType::kGather: in OperatorSupportsFusedActivation()
338 case OperatorType::kSlice: in OperatorSupportsFusedActivation()
339 case OperatorType::kSqueeze: in OperatorSupportsFusedActivation()
340 case OperatorType::kTensorFlowReshape: in OperatorSupportsFusedActivation()
341 case OperatorType::kTensorFlowSplit: in OperatorSupportsFusedActivation()
[all …]
/external/tensorflow/tensorflow/contrib/lite/toco/graph_transformations/
Didentify_lstm.cc58 OperatorType op_type, Operator** connected_op) { in MatchOperatorInputs()
66 if ((op_type == OperatorType::kNone) && (x != nullptr)) { in MatchOperatorInputs()
69 if ((op_type != OperatorType::kNone) && (x == nullptr)) { in MatchOperatorInputs()
91 OperatorType a_op_type, Operator** a_op, in MatchOperatorInputs()
92 OperatorType b_op_type, Operator** b_op) { in MatchOperatorInputs()
100 if ((a_op_type == OperatorType::kNone) && (x != nullptr)) { in MatchOperatorInputs()
103 if ((a_op_type != OperatorType::kNone) && (x == nullptr)) { in MatchOperatorInputs()
114 if ((b_op_type == OperatorType::kNone) && (y != nullptr)) { in MatchOperatorInputs()
117 if ((b_op_type != OperatorType::kNone) && (y == nullptr)) { in MatchOperatorInputs()
141 OperatorType a_op_type, Operator** a_op, in MatchOperatorInputs()
[all …]
Dfuse_binary_into_preceding_affine.cc33 CHECK(add_or_sub_op->type == OperatorType::kAdd || in FuseAddOrSubParamsIntoPrecedingAffine()
34 add_or_sub_op->type == OperatorType::kSub); in FuseAddOrSubParamsIntoPrecedingAffine()
57 const OpType optype = (add_or_sub_op->type == OperatorType::kAdd) in FuseAddOrSubParamsIntoPrecedingAffine()
81 CHECK(mul_or_div_op->type == OperatorType::kMul || in FuseMulOrDivParamsIntoPrecedingAffine()
82 mul_or_div_op->type == OperatorType::kDiv); in FuseMulOrDivParamsIntoPrecedingAffine()
86 CHECK(mul_or_div_op->type != OperatorType::kDiv || in FuseMulOrDivParamsIntoPrecedingAffine()
126 if (preceding_op->type == OperatorType::kConv || in FuseMulOrDivParamsIntoPrecedingAffine()
127 preceding_op->type == OperatorType::kFullyConnected) { in FuseMulOrDivParamsIntoPrecedingAffine()
129 } else if (preceding_op->type == OperatorType::kDepthwiseConv) { in FuseMulOrDivParamsIntoPrecedingAffine()
141 if (mul_or_div_op->type == OperatorType::kMul) { in FuseMulOrDivParamsIntoPrecedingAffine()
[all …]
Dresolve_constant_unary.cc35 if (unary_op->type != OperatorType::kCast && in Run()
36 unary_op->type != OperatorType::kNeg && in Run()
37 unary_op->type != OperatorType::kTensorFlowRsqrt && in Run()
38 unary_op->type != OperatorType::kTensorFlowSqrt && in Run()
39 unary_op->type != OperatorType::kTensorFlowSquare && in Run()
40 unary_op->type != OperatorType::kTensorFlowSum && in Run()
41 unary_op->type != OperatorType::kTensorFlowMin && in Run()
42 unary_op->type != OperatorType::kTensorFlowMax && in Run()
43 unary_op->type != OperatorType::kTensorFlowReshape) { in Run()
84 if (unary_op->type == OperatorType::kCast) { in Run()
[all …]
Dfuse_binary_into_following_affine.cc34 CHECK(add_or_sub_op->type == OperatorType::kAdd || in FuseAddOrSubParamsIntoFollowingAffine()
35 add_or_sub_op->type == OperatorType::kSub); in FuseAddOrSubParamsIntoFollowingAffine()
40 CHECK(add_or_sub_op->type != OperatorType::kSub || in FuseAddOrSubParamsIntoFollowingAffine()
59 if (add_or_sub_op->type == OperatorType::kAdd) { in FuseAddOrSubParamsIntoFollowingAffine()
61 } else if (add_or_sub_op->type == OperatorType::kSub && in FuseAddOrSubParamsIntoFollowingAffine()
77 if (following_op->type == OperatorType::kConv || in FuseAddOrSubParamsIntoFollowingAffine()
78 following_op->type == OperatorType::kFullyConnected) { in FuseAddOrSubParamsIntoFollowingAffine()
94 } else if (following_op->type == OperatorType::kDepthwiseConv) { in FuseAddOrSubParamsIntoFollowingAffine()
116 CHECK(mul_or_div_op->type == OperatorType::kMul || in FuseMulOrDivParamsIntoFollowingAffine()
117 mul_or_div_op->type == OperatorType::kDiv); in FuseMulOrDivParamsIntoFollowingAffine()
[all …]
Dquantize.cc35 if (type == OperatorType::kTensorFlowUnsupported) { in SupportsQuantization()
39 return type == OperatorType::kConv || type == OperatorType::kDepthwiseConv || in SupportsQuantization()
40 type == OperatorType::kFullyConnected || in SupportsQuantization()
41 type == OperatorType::kConcatenation || in SupportsQuantization()
42 type == OperatorType::kL2Normalization || type == OperatorType::kAdd || in SupportsQuantization()
43 type == OperatorType::kAveragePool || type == OperatorType::kMaxPool || in SupportsQuantization()
44 type == OperatorType::kTensorFlowMinimum || in SupportsQuantization()
45 type == OperatorType::kTensorFlowMaximum || in SupportsQuantization()
46 type == OperatorType::kLogistic || type == OperatorType::kSoftmax || in SupportsQuantization()
47 type == OperatorType::kTensorFlowSplit || type == OperatorType::kSub || in SupportsQuantization()
[all …]
Dpropagate_array_data_types.cc53 if (op->type == OperatorType::kDequantize || in Run()
54 op->type == OperatorType::kResizeBilinear) { in Run()
57 } else if (op->type == OperatorType::kTensorFlowLess || in Run()
58 op->type == OperatorType::kTensorFlowLessEqual || in Run()
59 op->type == OperatorType::kTensorFlowGreater || in Run()
60 op->type == OperatorType::kTensorFlowGreaterEqual) { in Run()
63 } else if (op->type == OperatorType::kRank || in Run()
64 op->type == OperatorType::kTensorFlowShape) { in Run()
67 } else if (op->type == OperatorType::kTensorFlowSplit || in Run()
68 op->type == OperatorType::kTensorFlowConcat || in Run()
[all …]
Dresolve_constant_binary.cc136 if (binary_op->type == OperatorType::kAdd) { in EvaluateBinaryOperatorOnConstantInputs()
138 } else if (binary_op->type == OperatorType::kMul) { in EvaluateBinaryOperatorOnConstantInputs()
140 } else if (binary_op->type == OperatorType::kSub) { in EvaluateBinaryOperatorOnConstantInputs()
142 } else if (binary_op->type == OperatorType::kDiv) { in EvaluateBinaryOperatorOnConstantInputs()
144 } else if (binary_op->type == OperatorType::kFloorDiv) { in EvaluateBinaryOperatorOnConstantInputs()
146 } else if (binary_op->type == OperatorType::kFloorMod) { in EvaluateBinaryOperatorOnConstantInputs()
148 } else if (binary_op->type == OperatorType::kTensorFlowMinimum) { in EvaluateBinaryOperatorOnConstantInputs()
150 } else if (binary_op->type == OperatorType::kTensorFlowMaximum) { in EvaluateBinaryOperatorOnConstantInputs()
152 } else if (binary_op->type == OperatorType::kTensorFlowLess) { in EvaluateBinaryOperatorOnConstantInputs()
154 } else if (binary_op->type == OperatorType::kTensorFlowLessEqual) { in EvaluateBinaryOperatorOnConstantInputs()
[all …]
Dpropagate_fixed_sizes.cc108 if (op.type == OperatorType::kConv || in GetOutputDepthFromWeights()
109 op.type == OperatorType::kFullyConnected) { in GetOutputDepthFromWeights()
111 } else if (op.type == OperatorType::kDepthwiseConv) { in GetOutputDepthFromWeights()
452 case OperatorType::kTensorFlowMin: in KeepDims()
454 case OperatorType::kTensorFlowMax: in KeepDims()
456 case OperatorType::kTensorFlowSum: in KeepDims()
458 case OperatorType::kMean: in KeepDims()
1346 case OperatorType::kBatchNormalization: in Run()
1347 case OperatorType::kL2Normalization: in Run()
1348 case OperatorType::kDequantize: in Run()
[all …]
Dremove_trivial_binary.cc52 if (binary_op->type != OperatorType::kAdd && in Run()
53 binary_op->type != OperatorType::kMul && in Run()
54 binary_op->type != OperatorType::kSub && in Run()
55 binary_op->type != OperatorType::kDiv) { in Run()
92 if (binary_op->type == OperatorType::kAdd) { in Run()
94 } else if (binary_op->type == OperatorType::kSub) { in Run()
97 } else if (binary_op->type == OperatorType::kMul) { in Run()
99 } else if (binary_op->type == OperatorType::kDiv) { in Run()
Dresolve_tensorflow_tile.cc31 CHECK(tile_op->type == OperatorType::kTensorFlowTile); in RemoveTileOperator()
63 if (binary_op->type != OperatorType::kAdd && in Run()
64 binary_op->type != OperatorType::kMul && in Run()
65 binary_op->type != OperatorType::kSub && in Run()
66 binary_op->type != OperatorType::kDiv) { in Run()
78 if (op[0] && op[0]->type == OperatorType::kTensorFlowTile && op[1] && in Run()
79 op[1]->type == OperatorType::kTensorFlowTile) { in Run()
84 if (op[i] && op[i]->type == OperatorType::kTensorFlowTile) { in Run()
Didentify_l2_normalization.cc45 OperatorType expected_op_type_producing_div_or_mul_input; in Run()
46 if (div_or_mul_op->type == OperatorType::kDiv) { in Run()
47 expected_op_type_producing_div_or_mul_input = OperatorType::kTensorFlowSqrt; in Run()
48 } else if (div_or_mul_op->type == OperatorType::kMul) { in Run()
50 OperatorType::kTensorFlowRsqrt; in Run()
77 if (op_producing_sqrt_or_rsqrt_input->type == OperatorType::kAdd || in Run()
79 OperatorType::kTensorFlowMaximum) { in Run()
116 if (sum_op->type != OperatorType::kTensorFlowSum) { in Run()
125 if (square_op->type != OperatorType::kTensorFlowSquare) { in Run()
Dfuse_activation_functions.cc32 if (ac_op->type != OperatorType::kRelu6 && in Run()
33 ac_op->type != OperatorType::kRelu1 && in Run()
34 ac_op->type != OperatorType::kRelu) { in Run()
80 if (ac_op->type == OperatorType::kRelu6) { in Run()
82 } else if (ac_op->type == OperatorType::kRelu1) { in Run()
84 } else if (ac_op->type == OperatorType::kRelu) { in Run()
Dhardcode_min_max.cc287 case OperatorType::kConv: in Run()
291 case OperatorType::kL2Normalization: in Run()
295 case OperatorType::kConcatenation: in Run()
299 case OperatorType::kAveragePool: in Run()
300 case OperatorType::kMaxPool: in Run()
304 case OperatorType::kSqueeze: in Run()
305 case OperatorType::kTensorFlowReshape: in Run()
306 case OperatorType::kPad: in Run()
310 case OperatorType::kLogistic: in Run()
316 case OperatorType::kSoftmax: in Run()
[all …]
Didentify_relu1.cc63 if (op_0->type != OperatorType::kTensorFlowMinimum && in Run()
64 op_0->type != OperatorType::kTensorFlowMaximum) { in Run()
71 (op_1->type != OperatorType::kTensorFlowMinimum && in Run()
72 op_1->type != OperatorType::kTensorFlowMaximum) || in Run()
78 op_0->type == OperatorType::kTensorFlowMinimum ? op_0 : op_1; in Run()
80 op_0->type == OperatorType::kTensorFlowMaximum ? op_0 : op_1; in Run()
Dresolve_constant_shape_or_rank.cc25 if (!(op->type == OperatorType::kTensorFlowShape || in Run()
26 op->type == OperatorType::kRank)) { in Run()
51 if (op->type == OperatorType::kTensorFlowShape) { in Run()
54 } else if (op->type == OperatorType::kRank) { in Run()
Dreorder_activation_functions.cc33 if (ac_op->type != OperatorType::kRelu6 && in Run()
34 ac_op->type != OperatorType::kRelu1 && in Run()
35 ac_op->type != OperatorType::kRelu) { in Run()
45 if (exchange_op->type != OperatorType::kTensorFlowReshape) { in Run()
Densure_bias_vectors.cc46 if (op->type == OperatorType::kConv || in Run()
47 op->type == OperatorType::kDepthwiseConv || in Run()
48 op->type == OperatorType::kFullyConnected) { in Run()
Dremove_trivial_reshape.cc33 CHECK(op.type == OperatorType::kTensorFlowReshape); in IsReshapeTrivial()
61 if (next_op->type == OperatorType::kTensorFlowReshape) { in IsReshapeTrivial()
78 if (reshape_op->type != OperatorType::kTensorFlowReshape) { in Run()
/external/tensorflow/tensorflow/contrib/lite/toco/tflite/
Doperator_test.cc33 const BaseOperator& GetOperator(const string& name, OperatorType type) { in GetOperator()
35 using OpsByType = std::map<OperatorType, std::unique_ptr<BaseOperator>>; in GetOperator()
87 void CheckSimpleOperator(const string& name, OperatorType type) { in CheckSimpleOperator()
102 OperatorType::kDequantize); in TEST_F()
103 CheckSimpleOperator<FloorOperator>("FLOOR", OperatorType::kFloor); in TEST_F()
104 CheckSimpleOperator<ReluOperator>("RELU", OperatorType::kRelu); in TEST_F()
105 CheckSimpleOperator<Relu1Operator>("RELU_N1_TO_1", OperatorType::kRelu1); in TEST_F()
106 CheckSimpleOperator<Relu6Operator>("RELU6", OperatorType::kRelu6); in TEST_F()
107 CheckSimpleOperator<LogisticOperator>("LOGISTIC", OperatorType::kLogistic); in TEST_F()
108 CheckSimpleOperator<TanhOperator>("TANH", OperatorType::kTanh); in TEST_F()
[all …]
Doperator.cc772 ops.emplace_back(new Add(::tflite::BuiltinOperator_ADD, OperatorType::kAdd)); in BuildOperatorList()
773 ops.emplace_back(new Div(::tflite::BuiltinOperator_DIV, OperatorType::kDiv)); in BuildOperatorList()
774 ops.emplace_back(new Sub(::tflite::BuiltinOperator_SUB, OperatorType::kSub)); in BuildOperatorList()
776 OperatorType::kAveragePool)); in BuildOperatorList()
779 OperatorType::kSpaceToBatchND)); in BuildOperatorList()
782 OperatorType::kBatchToSpaceND)); in BuildOperatorList()
784 OperatorType::kConcatenation)); in BuildOperatorList()
786 new Convolution(::tflite::BuiltinOperator_CONV_2D, OperatorType::kConv)); in BuildOperatorList()
789 OperatorType::kDepthwiseConv)); in BuildOperatorList()
791 OperatorType::kFullyConnected)); in BuildOperatorList()
[all …]
Doperator.h33 std::map<OperatorType, std::unique_ptr<BaseOperator>> BuildOperatorByTypeMap();
63 BaseOperator(const string& name, OperatorType type) in BaseOperator()
68 OperatorType type() const { return type_; } in type()
82 OperatorType type_;
Dexport_test.cc69 EXPECT_EQ(0, operators[details::OperatorKey(OperatorType::kAdd, "")]); in TEST_F()
70 EXPECT_EQ(1, operators[details::OperatorKey(OperatorType::kConv, "")]); in TEST_F()
71 EXPECT_EQ(2, operators[details::OperatorKey(OperatorType::kSub, "")]); in TEST_F()
73 OperatorType::kTensorFlowUnsupported, "MyCrazyOp")]); in TEST_F()

1234