Home
last modified time | relevance | path

Searched refs:model (Results 1 – 25 of 4706) sorted by relevance

12345678910>>...189

/external/tensorflow/tensorflow/lite/kernels/
Dcomparisons_test.cc96 ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_BOOL, in TEST() local
98 model.PopulateTensor<bool>(model.input1(), {true, false, true, false}); in TEST()
99 model.PopulateTensor<bool>(model.input2(), {true, true, false, false}); in TEST()
100 model.Invoke(); in TEST()
102 EXPECT_THAT(model.GetOutput(), ElementsAre(true, false, false, true)); in TEST()
103 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 1, 1, 4)); in TEST()
107 ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_FLOAT32, in TEST() local
109 model.PopulateTensor<float>(model.input1(), {0.1, 0.9, 0.7, 0.3}); in TEST()
110 model.PopulateTensor<float>(model.input2(), {0.1, 0.2, 0.6, 0.5}); in TEST()
111 model.Invoke(); in TEST()
[all …]
Dpack_test.cc56 PackOpModel<float> model({TensorType_FLOAT32, {2}}, 0, 3); in TEST() local
57 model.SetInput(0, {1, 4}); in TEST()
58 model.SetInput(1, {2, 5}); in TEST()
59 model.SetInput(2, {3, 6}); in TEST()
60 model.Invoke(); in TEST()
61 EXPECT_THAT(model.GetOutputShape(), ElementsAre(3, 2)); in TEST()
62 EXPECT_THAT(model.GetOutput(), ElementsAreArray({1, 4, 2, 5, 3, 6})); in TEST()
66 PackOpModel<float> model({TensorType_FLOAT32, {2}}, 1, 3); in TEST() local
67 model.SetInput(0, {1, 4}); in TEST()
68 model.SetInput(1, {2, 5}); in TEST()
[all …]
Dmirror_pad_test.cc53 BaseMirrorPadOpModel<int> model( in TEST() local
56 model.PopulateTensor<int>(model.input_tensor_id(), {1, 2, 3, 4, 5, 6}); in TEST()
57 model.PopulateTensor<int>(model.padding_matrix_tensor_id(), {0, 0, 0, 0}); in TEST()
58 model.Invoke(); in TEST()
59 EXPECT_THAT(model.GetOutput(), ElementsAreArray({1, 2, 3, 4, 5, 6})); in TEST()
63 BaseMirrorPadOpModel<int> model( in TEST() local
66 model.PopulateTensor<int>(model.input_tensor_id(), {1, 2, 3, 4, 5, 6}); in TEST()
67 model.PopulateTensor<int>(model.padding_matrix_tensor_id(), {0, 1, 0, 1}); in TEST()
68 model.Invoke(); in TEST()
69 EXPECT_THAT(model.GetOutput(), in TEST()
[all …]
Dreverse_test.cc54 ReverseOpModel<float> model({TensorType_FLOAT32, {4}}, in TEST() local
56 model.PopulateTensor<float>(model.input(), {1, 2, 3, 4}); in TEST()
57 model.PopulateTensor<int32_t>(model.axis(), {0}); in TEST()
58 model.Invoke(); in TEST()
60 EXPECT_THAT(model.GetOutputShape(), ElementsAre(4)); in TEST()
61 EXPECT_THAT(model.GetOutput(), ElementsAreArray({4, 3, 2, 1})); in TEST()
65 ReverseOpModel<float> model({TensorType_FLOAT32, {4, 3, 2}}, in TEST() local
67 model.PopulateTensor<float>(model.input(), in TEST()
70 model.PopulateTensor<int32_t>(model.axis(), {1}); in TEST()
71 model.Invoke(); in TEST()
[all …]
Dselect_test.cc60 SelectOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, {1, 1, 1, 4}, in TEST() local
63 model.PopulateTensor<bool>(model.input1(), {true, false, true, false}); in TEST()
64 model.PopulateTensor<bool>(model.input2(), {false, false, false, false}); in TEST()
65 model.PopulateTensor<bool>(model.input3(), {true, true, true, true}); in TEST()
66 model.Invoke(); in TEST()
68 EXPECT_THAT(model.GetOutput<bool>(), in TEST()
70 EXPECT_THAT(model.GetOutputShape(), ElementsAreArray({1, 1, 1, 4})); in TEST()
74 SelectOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, {1, 1, 1, 4}, in TEST() local
77 model.PopulateTensor<bool>(model.input1(), {true, false, true, false}); in TEST()
78 model.PopulateTensor<float>(model.input2(), {0.1, 0.2, 0.3, 0.4}); in TEST()
[all …]
Dreverse_sequence_test.cc56 ReverseSequenceOpModel<float> model({TensorType_FLOAT32, {4, 3, 2}}, in TEST() local
58 model.PopulateTensor<float>(model.input(), in TEST()
61 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 2, 3, 3}); in TEST()
62 model.Invoke(); in TEST()
63 EXPECT_THAT(model.GetOutputShape(), ElementsAre(4, 3, 2)); in TEST()
65 model.GetOutput(), in TEST()
71 ReverseSequenceOpModel<float> model({TensorType_FLOAT32, {4, 3, 2}}, in TEST() local
73 model.PopulateTensor<float>(model.input(), in TEST()
76 model.PopulateTensor<int32_t>(model.seq_lengths(), {3, 4}); in TEST()
77 model.Invoke(); in TEST()
[all …]
Darg_min_max_test.cc79 ArgMaxOpModel<int32_t> model({1, 1, 1, 4}, TensorType_FLOAT32, in TEST() local
81 model.PopulateTensor<float>(model.input(), {0.1, 0.9, 0.7, 0.3}); in TEST()
82 model.PopulateTensor<int>(model.axis(), {3}); in TEST()
83 model.Invoke(); in TEST()
85 EXPECT_THAT(model.GetOutput(), ElementsAreArray({1})); in TEST()
86 EXPECT_THAT(model.GetOutputShape(), ElementsAreArray({1, 1, 1})); in TEST()
90 ArgMaxOpModel<int32_t> model({1, 1, 1, 4}, TensorType_UINT8, TensorType_INT32, in TEST() local
92 model.PopulateTensor<uint8_t>(model.input(), {1, 9, 7, 3}); in TEST()
93 model.PopulateTensor<int>(model.axis(), {3}); in TEST()
94 model.Invoke(); in TEST()
[all …]
Drange_test.cc54 RangeOpModel<int32_t> model(TensorType_INT32); in TEST() local
55 model.PopulateTensor<int32_t>(model.start(), {0}); in TEST()
56 model.PopulateTensor<int32_t>(model.limit(), {4}); in TEST()
57 model.PopulateTensor<int32_t>(model.delta(), {1}); in TEST()
58 model.Invoke(); in TEST()
59 EXPECT_THAT(model.GetOutputShape(), ElementsAre(4)); in TEST()
60 EXPECT_THAT(model.GetOutput(), ElementsAre(0, 1, 2, 3)); in TEST()
64 RangeOpModel<int32_t> model(TensorType_INT32); in TEST() local
65 model.PopulateTensor<int32_t>(model.start(), {2}); in TEST()
66 model.PopulateTensor<int32_t>(model.limit(), {9}); in TEST()
[all …]
Dfloor_mod_test.cc52 FloorModModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
55 model.PopulateTensor<int32_t>(model.input1(), {10, 9, 11, 3}); in TEST()
56 model.PopulateTensor<int32_t>(model.input2(), {2, 2, 3, 4}); in TEST()
57 model.Invoke(); in TEST()
58 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 2, 2, 1)); in TEST()
59 EXPECT_THAT(model.GetOutput(), ElementsAre(0, 1, 2, 3)); in TEST()
63 FloorModModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
66 model.PopulateTensor<int32_t>(model.input1(), {10, -9, -11, 7}); in TEST()
67 model.PopulateTensor<int32_t>(model.input2(), {2, 2, -3, -4}); in TEST()
68 model.Invoke(); in TEST()
[all …]
Dpow_test.cc53 PowOpModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
56 model.PopulateTensor<int32_t>(model.input1(), {12, 2, 7, 8}); in TEST()
57 model.PopulateTensor<int32_t>(model.input2(), {1, 2, 3, 1}); in TEST()
58 model.Invoke(); in TEST()
59 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 2, 2, 1)); in TEST()
60 EXPECT_THAT(model.GetOutput(), ElementsAre(12, 4, 343, 8)); in TEST()
64 PowOpModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
67 model.PopulateTensor<int32_t>(model.input1(), {0, 2, -7, 8}); in TEST()
68 model.PopulateTensor<int32_t>(model.input2(), {1, 2, 3, 0}); in TEST()
69 model.Invoke(); in TEST()
[all …]
Done_hot_test.cc67 OneHotOpModel<float> model({3}, depth, TensorType_FLOAT32); in TEST() local
68 model.SetIndices({0, 1, 2}); in TEST()
69 model.Invoke(); in TEST()
71 EXPECT_THAT(model.GetOutputShape(), ElementsAreArray({3, 3})); in TEST()
72 EXPECT_THAT(model.GetOutput(), in TEST()
78 OneHotOpModel<int> model({3}, depth, TensorType_INT32); in TEST() local
79 model.SetIndices({0, 1, 2}); in TEST()
80 model.Invoke(); in TEST()
82 EXPECT_THAT(model.GetOutputShape(), ElementsAreArray({3, 3})); in TEST()
83 EXPECT_THAT(model.GetOutput(), ElementsAreArray({1, 0, 0, 0, 1, 0, 0, 0, 1})); in TEST()
[all …]
Dlogical_test.cc66 LogicalOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, BuiltinOperator_LOGICAL_OR); in TEST() local
67 model.PopulateTensor<bool>(model.input1(), {true, false, false, true}); in TEST()
68 model.PopulateTensor<bool>(model.input2(), {true, false, true, false}); in TEST()
69 model.Invoke(); in TEST()
71 EXPECT_THAT(model.GetOutput(), ElementsAre(true, false, true, true)); in TEST()
72 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 1, 1, 4)); in TEST()
76 LogicalOpModel model({1, 1, 1, 4}, {1, 1, 1, 1}, BuiltinOperator_LOGICAL_OR); in TEST() local
77 model.PopulateTensor<bool>(model.input1(), {true, false, false, true}); in TEST()
78 model.PopulateTensor<bool>(model.input2(), {false}); in TEST()
79 model.Invoke(); in TEST()
[all …]
Dunique_test.cc53 UniqueOpModel<float, int32_t> model({TensorType_FLOAT32, {1}}, in TEST() local
55 model.PopulateTensor<float>(model.input_tensor_id(), {5}); in TEST()
56 model.Invoke(); in TEST()
57 EXPECT_THAT(model.GetOutput(), ElementsAreArray({5})); in TEST()
58 EXPECT_THAT(model.GetIndexesOutput(), ElementsAreArray({0})); in TEST()
62 UniqueOpModel<float, int32_t> model({TensorType_FLOAT32, {8}}, in TEST() local
64 model.PopulateTensor<float>(model.input_tensor_id(), in TEST()
66 model.Invoke(); in TEST()
67 EXPECT_THAT(model.GetOutput(), ElementsAreArray({5, 2, 3, 51, 6, 72, 7, 8})); in TEST()
68 EXPECT_THAT(model.GetIndexesOutput(), in TEST()
[all …]
/external/tensorflow/tensorflow/python/keras/engine/
Dsequential_test.py41 model = keras.models.Sequential()
42 model.add(keras.layers.Dense(1, input_dim=2))
43 model.add(keras.layers.Dropout(0.3, name='dp'))
44 model.add(keras.layers.Dense(2, kernel_regularizer='l2',
46 self.assertEqual(len(model.layers), 3)
47 self.assertEqual(len(model.weights), 2 * 2)
48 self.assertEqual(model.get_layer(name='dp').name, 'dp')
52 model = keras.models.Sequential()
53 model.add(keras.Input(shape=(2,), name='input_layer'))
54 model.add(keras.layers.Dense(1))
[all …]
Dtraining_test.py65 def _do_test_compile_with_model_and_single_loss(self, model, loss): argument
66 model.compile(optimizer='adam', loss=loss)
67 self.assertEqual(model.loss, loss)
71 loss_list = [loss] * len(model.outputs)
73 self.assertEqual(len(model.loss_functions), len(loss_list))
75 self.assertIsInstance(model.loss_functions[i], losses.LossFunctionWrapper)
77 self.assertEqual(model.loss_functions[i].fn, loss_list[i])
78 self.assertAllEqual(model.loss_weights_list, [1.] * len(loss_list))
85 model = testing_utils.get_small_sequential_mlp(
87 self._do_test_compile_with_model_and_single_loss(model, loss)
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Didentify_lstm.cc28 Model* model, const Operator& op) { in FindOperator() argument
29 auto it = model->operators.begin(); in FindOperator()
30 for (; it != model->operators.end(); ++it) { in FindOperator()
38 bool ValidateSourceOp(const Model& model, const string& array_name, in ValidateSourceOp() argument
44 *source_op = GetOpWithOutput(model, array_name); in ValidateSourceOp()
62 bool MatchOperatorInputs(const Operator& op, const Model& model, in MatchOperatorInputs() argument
70 if (!ValidateSourceOp(model, op.inputs[0], op_type, connected_op)) { in MatchOperatorInputs()
81 bool MatchOperatorInputs(const Operator& op, const Model& model, in MatchOperatorInputs() argument
90 if (!ValidateSourceOp(model, op.inputs[0], a_op_type, a_op)) { in MatchOperatorInputs()
95 if (!ValidateSourceOp(model, op.inputs[1], b_op_type, b_op)) { in MatchOperatorInputs()
[all …]
Dgroup_bidirectional_sequence_ops.cc31 Model* model, const Operator& op) { in FindOperator() argument
33 model->operators.begin(), model->operators.end(), in FindOperator()
37 bool MatchTwoUnpackOps(const Operator& op, const Model& model, in MatchTwoUnpackOps() argument
43 *fw_output = GetOpWithOutput(model, op.inputs[0]); in MatchTwoUnpackOps()
44 *bw_output = GetOpWithOutput(model, op.inputs[1]); in MatchTwoUnpackOps()
59 bool MatchDynamicBidirectionalSequenceOutputs(Operator* op, const Model& model, in MatchDynamicBidirectionalSequenceOutputs() argument
68 auto* reverse_output = GetOpWithOutput(model, op->inputs[1]); in MatchDynamicBidirectionalSequenceOutputs()
83 bool FindUnidirectionalSequenceOp(const Model& model, const Operator& output_op, in FindUnidirectionalSequenceOp() argument
88 op_it = GetOpWithOutput(model, output_op.inputs[0]); in FindUnidirectionalSequenceOp()
96 op_it = GetOpWithOutput(model, op_it->inputs[0]); in FindUnidirectionalSequenceOp()
[all …]
Dpropagate_array_data_types.cc27 void SetDataTypeForAllOutputs(Model* model, Operator* op, in SetDataTypeForAllOutputs() argument
30 model->GetArray(output).data_type = data_type; in SetDataTypeForAllOutputs()
35 ::tensorflow::Status PropagateArrayDataTypes::Run(Model* model, in Run() argument
39 auto it = model->operators.begin() + op_index; in Run()
44 if (!model->IsOptionalArray(input) && in Run()
45 model->GetArray(input).data_type == ArrayDataType::kNone) { in Run()
53 old_output_data_types[output] = model->GetArray(output).data_type; in Run()
60 SetDataTypeForAllOutputs(model, op, ArrayDataType::kFloat); in Run()
73 SetDataTypeForAllOutputs(model, op, ArrayDataType::kBool); in Run()
78 SetDataTypeForAllOutputs(model, op, ArrayDataType::kInt32); in Run()
[all …]
/external/tensorflow/tensorflow/python/keras/
Dmodels.py53 def _clone_functional_model(model, input_tensors=None, share_weights=False): argument
79 if not isinstance(model, Model):
81 'to be a `Model` instance, got ', model)
82 if isinstance(model, Sequential):
85 'got a `Sequential` instance instead:', model)
92 for layer in model._input_layers:
110 original_input_layer = model._input_layers[i]
123 for x, y in zip(model.inputs, input_tensors):
127 depth_keys = list(model._nodes_by_depth.keys())
130 nodes = model._nodes_by_depth[depth]
[all …]
Dmodel_subclassing_test.py227 model = DummyModel()
228 model.compile('sgd', 'mse', run_eagerly=testing_utils.should_run_eagerly())
229 model.fit(np.ones((10, 10)), np.ones((10, 1)), batch_size=2, epochs=2)
230 self.assertLen(model.layers, 2)
231 self.assertLen(model.trainable_variables, 4)
237 model = SimpleTestModel(num_classes=num_classes,
241 self.assertFalse(model.built, 'Model should not have been built')
242 self.assertFalse(model.weights, ('Model should have no weights since it '
246 model.build(input_shape=tensor_shape.Dimension(input_dim))
277 model = EmbedModel(100, 20)
[all …]
/external/ImageMagick/PerlMagick/demo/
Ddemo.pl16 $model=Image::Magick->new();
17 $x=$model->ReadImage('model.gif');
19 $model->Label('Magick');
20 $model->Set(background=>'white');
34 $example=$model->Clone();
40 $example=$model->Clone();
46 $example=$model->Clone();
52 $example=$model->Clone();
58 $example=$model->Clone();
64 $example=$model->Clone();
[all …]
/external/ImageMagick/www/source/
Dexamples.pl16 $model=Image::Magick->new();
17 $x=$model->ReadImage('model.gif');
19 $model->Label('Magick');
20 $model->Set(background=>'white');
34 $example=$model->Clone();
40 $example=$model->Clone();
46 $example=$model->Clone();
52 $example=$model->Clone();
58 $example=$model->Clone();
64 $example=$model->Clone();
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/javasymbolsolver_0_6_0/expected_output/java-symbol-solver-core/
Dcom_github_javaparser_symbolsolver_javaparsermodel_contexts_MethodCallExprContext.txt4 …r.javaparsermodel.JavaParserFacade.get(com.github.javaparser.symbolsolver.model.resolution.TypeSol…
7 …().getGenericParameterByName(name) ==> com.github.javaparser.symbolsolver.model.typesystem.Referen…
8 …Line 66) typeOfScope.asReferenceType() ==> com.github.javaparser.symbolsolver.model.typesystem.Typ…
16 …on.Context.solveType(java.lang.String, com.github.javaparser.symbolsolver.model.resolution.TypeSol…
17 …Line 86) ref.isSolved() ==> com.github.javaparser.symbolsolver.model.resolution.SymbolReference.is…
18model.declarations.TypeDeclaration, java.lang.String, java.util.List<com.github.javaparser.symbols…
19 …Line 87) ref.getCorrespondingDeclaration() ==> com.github.javaparser.symbolsolver.model.resolution…
20 …Line 88) m.isSolved() ==> com.github.javaparser.symbolsolver.model.resolution.SymbolReference.isSo…
21 …Line 89) m.getCorrespondingDeclaration() ==> com.github.javaparser.symbolsolver.model.resolution.S…
22 …itList(com.github.javaparser.symbolsolver.model.resolution.TypeSolver, com.github.javaparser.symbo…
[all …]
Dcom_github_javaparser_symbolsolver_resolution_MethodResolutionLogic.txt6 …utionLogic.findCommonType(java.util.List<com.github.javaparser.symbolsolver.model.typesystem.Type>)
10model.declarations.MethodDeclaration, java.lang.String, java.util.List<com.github.javaparser.symbo…
12 …Line 70) method.getName() ==> com.github.javaparser.symbolsolver.model.declarations.Declaration.ge…
13 …Line 73) method.hasVariadicParameter() ==> com.github.javaparser.symbolsolver.model.declarations.M…
14 …Line 74) method.getNumberOfParams() ==> com.github.javaparser.symbolsolver.model.declarations.Meth…
15 …Line 75) method.getNumberOfParams() ==> com.github.javaparser.symbolsolver.model.declarations.Meth…
17 …Line 77) method.getLastParam().getType() ==> com.github.javaparser.symbolsolver.model.declarations…
18 …Line 77) method.getLastParam() ==> com.github.javaparser.symbolsolver.model.declarations.MethodLik…
20 …=> com.github.javaparser.symbolsolver.model.typesystem.Type.isAssignableBy(com.github.javaparser.s…
21 …Line 80) method.getTypeParameters() ==> com.github.javaparser.symbolsolver.model.declarations.Type…
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/resources/javasymbolsolver_0_6_0/expected_output/java-symbol-solver-logic/
Dcom_github_javaparser_symbolsolver_logic_InferenceContext.txt2 …Line 44) tp.getName() ==> com.github.javaparser.symbolsolver.model.declarations.TypeParameterDecla…
4 …ferenceVariableType.setCorrespondingTp(com.github.javaparser.symbolsolver.model.declarations.TypeP…
6 …Line 48) tp.getName() ==> com.github.javaparser.symbolsolver.model.declarations.TypeParameterDecla…
8 …Line 50) tp.getName() ==> com.github.javaparser.symbolsolver.model.declarations.TypeParameterDecla…
9 ….InferenceContext.placeInferenceVariables(com.github.javaparser.symbolsolver.model.typesystem.Type)
10 ….InferenceContext.placeInferenceVariables(com.github.javaparser.symbolsolver.model.typesystem.Type)
11 …spondance(com.github.javaparser.symbolsolver.model.typesystem.Type, com.github.javaparser.symbolso…
12 ….InferenceContext.placeInferenceVariables(com.github.javaparser.symbolsolver.model.typesystem.Type)
13 …Line 69) formalType.isReferenceType() ==> com.github.javaparser.symbolsolver.model.typesystem.Type…
14 …Line 69) actualType.isReferenceType() ==> com.github.javaparser.symbolsolver.model.typesystem.Type…
[all …]

12345678910>>...189