/external/tensorflow/tensorflow/lite/toco/ |
D | model.h | 37 enum class OperatorType : uint8 { enum 374 const OperatorType type; 406 explicit Operator(OperatorType t) 458 ConvOperator() : Operator(OperatorType::kConv) {} 485 : Operator(OperatorType::kCTCBeamSearchDecoder) {} 501 DepthwiseConvOperator() : Operator(OperatorType::kDepthwiseConv) {} 520 DepthToSpaceOperator() : Operator(OperatorType::kDepthToSpace) {} 531 SpaceToDepthOperator() : Operator(OperatorType::kSpaceToDepth) {} 546 FullyConnectedOperator() : Operator(OperatorType::kFullyConnected) {} 575 DequantizeOperator() : Operator(OperatorType::kDequantize) {} [all …]
|
D | export_tensorflow.cc | 377 CHECK(op->type == OperatorType::kFakeQuant); in WalkUpToConstantArray() 813 if (providing_op != nullptr && providing_op->type == OperatorType::kReshape) { in ConvertSoftmaxOperator() 853 if (providing_op != nullptr && providing_op->type == OperatorType::kReshape) { in ConvertLogSoftmaxOperator() 1786 if (src_op.type != OperatorType::kAny) { in ConvertReduceOperator() 2100 if (src_op.type == OperatorType::kConv) { in ConvertOperator() 2103 } else if (src_op.type == OperatorType::kDepthwiseConv) { in ConvertOperator() 2107 } else if (src_op.type == OperatorType::kDepthToSpace) { in ConvertOperator() 2111 } else if (src_op.type == OperatorType::kSpaceToDepth) { in ConvertOperator() 2115 } else if (src_op.type == OperatorType::kFullyConnected) { in ConvertOperator() 2119 } else if (src_op.type == OperatorType::kAdd) { in ConvertOperator() [all …]
|
/external/tensorflow/tensorflow/lite/toco/graph_transformations/ |
D | quantize.cc | 36 if (type == OperatorType::kUnsupported) { in SupportsQuantization() 40 return type == OperatorType::kConv || type == OperatorType::kDepthwiseConv || in SupportsQuantization() 41 type == OperatorType::kFullyConnected || in SupportsQuantization() 42 type == OperatorType::kConcatenation || in SupportsQuantization() 43 type == OperatorType::kL2Normalization || type == OperatorType::kAdd || in SupportsQuantization() 44 type == OperatorType::kAveragePool || type == OperatorType::kMaxPool || in SupportsQuantization() 45 type == OperatorType::kMinimum || type == OperatorType::kMaximum || in SupportsQuantization() 46 type == OperatorType::kLogistic || type == OperatorType::kSoftmax || in SupportsQuantization() 47 type == OperatorType::kLogSoftmax || type == OperatorType::kSlice || in SupportsQuantization() 48 type == OperatorType::kResizeBilinear || in SupportsQuantization() [all …]
|
D | propagate_array_data_types.cc | 57 case OperatorType::kDequantize: in Run() 58 case OperatorType::kResizeBilinear: in Run() 62 case OperatorType::kLess: in Run() 63 case OperatorType::kLessEqual: in Run() 64 case OperatorType::kGreater: in Run() 65 case OperatorType::kGreaterEqual: in Run() 66 case OperatorType::kEqual: in Run() 67 case OperatorType::kNotEqual: in Run() 68 case OperatorType::kAny: in Run() 69 case OperatorType::kLogicalAnd: in Run() [all …]
|
D | resolve_constant_unary.cc | 123 case OperatorType::kCast: in Run() 124 case OperatorType::kExp: in Run() 125 case OperatorType::kLog: in Run() 126 case OperatorType::kNeg: in Run() 127 case OperatorType::kRsqrt: in Run() 128 case OperatorType::kSqrt: in Run() 129 case OperatorType::kSquare: in Run() 130 case OperatorType::kSum: in Run() 131 case OperatorType::kReduceMin: // Reduction Min in Run() 132 case OperatorType::kReduceMax: // Reduction Max in Run() [all …]
|
D | reorder_elementwise_unary.cc | 30 bool IsElementwiseOperator(OperatorType optype) { in IsElementwiseOperator() 32 case OperatorType::kCast: in IsElementwiseOperator() 33 case OperatorType::kCeil: in IsElementwiseOperator() 34 case OperatorType::kExp: in IsElementwiseOperator() 35 case OperatorType::kFloor: in IsElementwiseOperator() 36 case OperatorType::kNeg: in IsElementwiseOperator() 37 case OperatorType::kRelu: in IsElementwiseOperator() 38 case OperatorType::kRelu1: in IsElementwiseOperator() 39 case OperatorType::kRelu6: in IsElementwiseOperator() 40 case OperatorType::kTanh: in IsElementwiseOperator() [all …]
|
D | fuse_binary_into_preceding_affine.cc | 33 CHECK(add_or_sub_op->type == OperatorType::kAdd || in FuseAddOrSubParamsIntoPrecedingAffine() 34 add_or_sub_op->type == OperatorType::kSub); in FuseAddOrSubParamsIntoPrecedingAffine() 67 const OpType optype = (add_or_sub_op->type == OperatorType::kAdd) in FuseAddOrSubParamsIntoPrecedingAffine() 93 CHECK(mul_or_div_op->type == OperatorType::kMul || in FuseMulOrDivParamsIntoPrecedingAffine() 94 mul_or_div_op->type == OperatorType::kDiv); in FuseMulOrDivParamsIntoPrecedingAffine() 98 CHECK(mul_or_div_op->type != OperatorType::kDiv || in FuseMulOrDivParamsIntoPrecedingAffine() 138 if (preceding_op->type == OperatorType::kConv || in FuseMulOrDivParamsIntoPrecedingAffine() 139 preceding_op->type == OperatorType::kFullyConnected) { in FuseMulOrDivParamsIntoPrecedingAffine() 141 } else if (preceding_op->type == OperatorType::kDepthwiseConv) { in FuseMulOrDivParamsIntoPrecedingAffine() 153 if (mul_or_div_op->type == OperatorType::kMul) { in FuseMulOrDivParamsIntoPrecedingAffine() [all …]
|
D | identify_lstm.cc | 39 OperatorType op_type, Operator** source_op) { in ValidateSourceOp() 40 if (op_type == OperatorType::kNone) { in ValidateSourceOp() 63 OperatorType op_type, Operator** connected_op) { in MatchOperatorInputs() 82 OperatorType a_op_type, Operator** a_op, in MatchOperatorInputs() 83 OperatorType b_op_type, Operator** b_op) { in MatchOperatorInputs() 107 OperatorType a_op_type, Operator** a_op, in MatchOperatorInputs() 108 OperatorType b_op_type, Operator** b_op, in MatchOperatorInputs() 109 OperatorType c_op_type, Operator** c_op) { in MatchOperatorInputs() 147 if (final_output_mul->type != OperatorType::kMul) { in Run() 158 if (!MatchOperatorInputs(*final_output_mul, *model, OperatorType::kTanh, in Run() [all …]
|
D | fuse_binary_into_following_affine.cc | 34 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 …]
|
D | propagate_fake_quant_num_bits.cc | 97 case OperatorType::kConcatenation: in DoesOpBlockBackwardPropagation() 98 case OperatorType::kConcat: in DoesOpBlockBackwardPropagation() 99 case OperatorType::kConcatV2: in DoesOpBlockBackwardPropagation() 103 case OperatorType::kDequantize: in DoesOpBlockBackwardPropagation() 106 case OperatorType::kGather: in DoesOpBlockBackwardPropagation() 108 case OperatorType::kReshape: in DoesOpBlockBackwardPropagation() 109 case OperatorType::kTranspose: in DoesOpBlockBackwardPropagation() 110 case OperatorType::kSelect: in DoesOpBlockBackwardPropagation() 111 case OperatorType::kTile: in DoesOpBlockBackwardPropagation() 113 case OperatorType::kRelu: in DoesOpBlockBackwardPropagation() [all …]
|
D | resolve_constant_binary.cc | 136 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::kMinimum) { in EvaluateBinaryOperatorOnConstantInputs() 150 } else if (binary_op->type == OperatorType::kMaximum) { in EvaluateBinaryOperatorOnConstantInputs() 152 } else if (binary_op->type == OperatorType::kLess) { in EvaluateBinaryOperatorOnConstantInputs() 154 } else if (binary_op->type == OperatorType::kLessEqual) { in EvaluateBinaryOperatorOnConstantInputs() [all …]
|
D | propagate_fixed_sizes.cc | 534 case OperatorType::kReduceMin: // Reduction Min in KeepDims() 536 case OperatorType::kReduceMax: // Reduction Max in KeepDims() 538 case OperatorType::kSum: in KeepDims() 540 case OperatorType::kReduceProd: in KeepDims() 542 case OperatorType::kMean: in KeepDims() 544 case OperatorType::kAny: in KeepDims() 2079 case OperatorType::kAbs: in Run() 2080 case OperatorType::kBatchNormalization: in Run() 2081 case OperatorType::kL2Normalization: in Run() 2082 case OperatorType::kDequantize: in Run() [all …]
|
D | group_bidirectional_sequence_ops.cc | 49 if ((*fw_output)->type != OperatorType::kUnpack || in MatchTwoUnpackOps() 50 (*bw_output)->type != OperatorType::kUnpack) { in MatchTwoUnpackOps() 73 if (reverse_output->type != OperatorType::kReverseV2 && in MatchDynamicBidirectionalSequenceOutputs() 74 reverse_output->type != OperatorType::kReverseSequence) { in MatchDynamicBidirectionalSequenceOutputs() 84 OperatorType operator_type, in FindUnidirectionalSequenceOp() 158 if (first_bw_sequence_op_input->type != OperatorType::kReverseV2 && in CheckTwoUnidirectionalSequenceOpsAreValid() 159 first_bw_sequence_op_input->type != OperatorType::kReverseSequence) { in CheckTwoUnidirectionalSequenceOpsAreValid() 171 if (first_fw_sequence_op_input->type != OperatorType::kPack || in CheckTwoUnidirectionalSequenceOpsAreValid() 172 first_bw_sequence_op_input->type != OperatorType::kPack) { in CheckTwoUnidirectionalSequenceOpsAreValid() 321 OperatorType operator_type, const string& input_array_name, in RewireBidirectionalSequenceSequenceOpsConnections() [all …]
|
D | move_binary_operator_before_reshape.cc | 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() 67 binary_op->type != OperatorType::kFloorDiv && in Run() 68 binary_op->type != OperatorType::kFloorMod && in Run() 69 binary_op->type != OperatorType::kMinimum && in Run() 70 binary_op->type != OperatorType::kMaximum && in Run() 71 binary_op->type != OperatorType::kLess && in Run() 72 binary_op->type != OperatorType::kLessEqual && in Run() [all …]
|
D | hardcode_min_max.cc | 402 case OperatorType::kConv: in Run() 406 case OperatorType::kL2Normalization: in Run() 410 case OperatorType::kRelu: in Run() 420 case OperatorType::kConcatenation: in Run() 424 case OperatorType::kSplit: in Run() 428 case OperatorType::kAveragePool: in Run() 429 case OperatorType::kMaxPool: in Run() 433 case OperatorType::kResizeBilinear: in Run() 434 case OperatorType::kResizeNearestNeighbor: in Run() 435 case OperatorType::kSlice: in Run() [all …]
|
D | remove_trivial_binary.cc | 55 if (binary_op->type != OperatorType::kAdd && in Run() 56 binary_op->type != OperatorType::kMul && in Run() 57 binary_op->type != OperatorType::kSub && in Run() 58 binary_op->type != OperatorType::kDiv) { in Run() 114 if (binary_op->type == OperatorType::kAdd) { in Run() 116 } else if (binary_op->type == OperatorType::kSub) { in Run() 119 } else if (binary_op->type == OperatorType::kMul) { in Run() 121 } else if (binary_op->type == OperatorType::kDiv) { in Run()
|
D | identify_l2_normalization.cc | 48 OperatorType expected_op_type_producing_div_or_mul_input; in Run() 49 if (div_or_mul_op->type == OperatorType::kDiv) { in Run() 50 expected_op_type_producing_div_or_mul_input = OperatorType::kSqrt; in Run() 51 } else if (div_or_mul_op->type == OperatorType::kMul) { in Run() 52 expected_op_type_producing_div_or_mul_input = OperatorType::kRsqrt; in Run() 79 if (op_producing_sqrt_or_rsqrt_input->type == OperatorType::kAdd || in Run() 80 op_producing_sqrt_or_rsqrt_input->type == OperatorType::kMaximum) { in Run() 117 if (sum_op->type != OperatorType::kSum) { in Run() 126 if (square_op->type != OperatorType::kSquare) { in Run()
|
D | propagate_activation_function_into_constants.cc | 34 if (ac_op->type != OperatorType::kRelu6 && in Run() 35 ac_op->type != OperatorType::kRelu1 && in Run() 36 ac_op->type != OperatorType::kRelu) { in Run() 57 case OperatorType::kGather: in Run() 93 case OperatorType::kRelu: { in Run() 98 case OperatorType::kRelu1: { in Run() 104 case OperatorType::kRelu6: { in Run()
|
D | resolve_reduce_attributes.cc | 53 case OperatorType::kMean: in Run() 56 case OperatorType::kSum: in Run() 60 case OperatorType::kReduceProd: in Run() 64 case OperatorType::kReduceMin: in Run() 68 case OperatorType::kReduceMax: in Run() 72 case OperatorType::kAny: in Run()
|
D | ensure_bias_vectors.cc | 32 if (op.type == OperatorType::kConv || in GetOutputDepthFromWeights() 33 op.type == OperatorType::kFullyConnected) { in GetOutputDepthFromWeights() 36 if (op.type == OperatorType::kDepthwiseConv) { in GetOutputDepthFromWeights() 69 if (op->type == OperatorType::kConv || in Run() 70 op->type == OperatorType::kDepthwiseConv || in Run() 71 op->type == OperatorType::kFullyConnected) { in Run()
|
D | identify_dilated_conv.cc | 73 if (post_conv_op->type != OperatorType::kSqueeze) { in ResolveDilatedConv() 86 if (pad_op->type == OperatorType::kPad) { in ResolveDilatedConv() 100 if (next_op->type == OperatorType::kAdd) { in ResolveDilatedConv() 107 if (bts_op->type != OperatorType::kBatchToSpaceND) { in ResolveDilatedConv() 115 if (bias_add_op->type != OperatorType::kAdd) { in ResolveDilatedConv() 181 if (stb_op->type != OperatorType::kSpaceToBatchND) { in Run() 204 if (post_stb_op->type == OperatorType::kExpandDims) { in Run() 215 if (conv_base_op->type == OperatorType::kConv) { in Run() 224 conv_base_op->type == OperatorType::kDepthwiseConv) { in Run()
|
D | fuse_activation_functions.cc | 35 if (ac_op->type != OperatorType::kRelu6 && in Run() 36 ac_op->type != OperatorType::kRelu1 && in Run() 37 ac_op->type != OperatorType::kRelu) { in Run() 92 if (ac_op->type == OperatorType::kRelu6) { in Run() 94 } else if (ac_op->type == OperatorType::kRelu1) { in Run() 96 } else if (ac_op->type == OperatorType::kRelu) { in Run()
|
D | remove_trivial_quantized_min_max.cc | 34 OperatorType op_type, const string& input_array_name, in IsTrivialMinMax() 50 case OperatorType::kMinimum: // Element-wise Minimum in IsTrivialMinMax() 54 case OperatorType::kMaximum: // Element-wise Maximum in IsTrivialMinMax() 78 if ((op->type != OperatorType::kMinimum && in Run() 79 op->type != OperatorType::kMaximum) || in Run()
|
/external/tensorflow/tensorflow/lite/toco/tflite/ |
D | operator_test.cc | 34 const BaseOperator& GetOperator(const string& name, OperatorType type) { in GetOperator() 36 using OpsByType = std::map<OperatorType, std::unique_ptr<BaseOperator>>; in GetOperator() 90 void CheckSimpleOperator(const string& name, OperatorType type) { in CheckSimpleOperator() 103 void CheckReducerOperator(const string& name, OperatorType type) { in CheckReducerOperator() 114 CheckSimpleOperator<FloorOperator>("FLOOR", OperatorType::kFloor); in TEST_F() 115 CheckSimpleOperator<CeilOperator>("CEIL", OperatorType::kCeil); in TEST_F() 116 CheckSimpleOperator<EluOperator>("ELU", OperatorType::kElu); in TEST_F() 117 CheckSimpleOperator<ReluOperator>("RELU", OperatorType::kRelu); in TEST_F() 118 CheckSimpleOperator<Relu1Operator>("RELU_N1_TO_1", OperatorType::kRelu1); in TEST_F() 119 CheckSimpleOperator<Relu6Operator>("RELU6", OperatorType::kRelu6); in TEST_F() [all …]
|
D | operator.cc | 733 explicit Maximum() : SimpleOperator("MAXIMUM", OperatorType::kMaximum) {} in Maximum() 747 explicit Minimum() : SimpleOperator("MINIMUM", OperatorType::kMinimum) {} in Minimum() 1329 explicit Relu6() : SimpleOperator("RELU6", OperatorType::kRelu6) {} in Relu6() 1708 explicit Slice() : SimpleOperator("SLICE", OperatorType::kSlice) {} in Slice() 1722 explicit Tanh() : SimpleOperator("TANH", OperatorType::kTanh) {} in Tanh() 1818 explicit Logistic() : SimpleOperator("LOGISTIC", OperatorType::kLogistic) {} in Logistic() 1833 : SimpleOperator("LOG_SOFTMAX", OperatorType::kLogSoftmax) {} in LogSoftmax() 1989 TensorFlowUnsupported(const string& name, OperatorType type, in TensorFlowUnsupported() 2235 explicit Equal() : SimpleOperator("EQUAL", OperatorType::kEqual) {} in Equal() 2249 explicit NotEqual() : SimpleOperator("NOT_EQUAL", OperatorType::kNotEqual) {} in NotEqual() [all …]
|