Home
last modified time | relevance | path

Searched +full:- +full:- +full:model (Results 1 – 25 of 1564) sorted by relevance

12345678910>>...63

/external/pytorch/torch/ao/quantization/
Dquantize_jit.py1 # mypy: allow-untyped-defs
22 def _check_is_script_module(model): argument
23 if not isinstance(model, torch.jit.ScriptModule):
24 raise ValueError("input must be a script module, got: " + str(type(model)))
27 def _check_forward_method(model): argument
28 if not model._c._has_method("forward"):
51 def fuse_conv_bn_jit(model, inplace=False): argument
52 r"""Fuse conv - bn module
53 Works for eval model only.
56 model: TorchScript model from scripting or tracing
[all …]
Dquantize_pt2e.py32 model: GraphModule,
34 ) -> GraphModule:
35 """Prepare a model for post training quantization
38 * `model` (torch.fx.GraphModule): a model captured by `torch.export` API
42 model to be quantized. Tutorial for how to write a quantizer can be found here:
59 def __init__(self) -> None:
66 # initialize a floating point model
70 def calibrate(model, data_loader):
71 model.eval()
74 model(image)
[all …]
/external/tensorflow/tensorflow/lite/kernels/
Dcomparisons_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
103 ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_BOOL, in TEST() local
105 model.PopulateTensor<bool>(model.input1(), {true, false, true, false}); in TEST()
106 model.PopulateTensor<bool>(model.input2(), {true, true, false, false}); in TEST()
107 ASSERT_EQ(model.Invoke(), kTfLiteOk); in TEST()
109 EXPECT_THAT(model.GetOutput(), ElementsAre(true, false, false, true)); in TEST()
110 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 1, 1, 4)); in TEST()
114 ComparisonOpModel model({1, 1, 1, 4}, {1, 1, 1, 4}, TensorType_FLOAT32, in TEST() local
116 model.PopulateTensor<float>(model.input1(), {0.1, 0.9, 0.7, 0.3}); in TEST()
117 model.PopulateTensor<float>(model.input2(), {0.1, 0.2, 0.6, 0.5}); in TEST()
[all …]
Dfloor_mod_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
31 FloorModModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
34 model.PopulateTensor<int32_t>(model.input1(), {10, 9, 11, 3}); in TEST()
35 model.PopulateTensor<int32_t>(model.input2(), {2, 2, 3, 4}); in TEST()
36 ASSERT_EQ(model.Invoke(), kTfLiteOk); in TEST()
37 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 2, 2, 1)); in TEST()
38 EXPECT_THAT(model.GetOutput(), ElementsAre(0, 1, 2, 3)); in TEST()
42 FloorModModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
45 model.PopulateTensor<int32_t>(model.input1(), {10, -9, -11, 7}); in TEST()
46 model.PopulateTensor<int32_t>(model.input2(), {2, 2, -3, -4}); in TEST()
[all …]
Dreverse_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
57 ReverseOpModel<float> model({TensorType_FLOAT32, {4}}, in TEST() local
59 model.PopulateTensor<float>(model.input(), {1, 2, 3, 4}); in TEST()
60 model.PopulateTensor<int32_t>(model.axis(), {0}); in TEST()
61 ASSERT_EQ(model.Invoke(), kTfLiteOk); in TEST()
63 EXPECT_THAT(model.GetOutputShape(), ElementsAre(4)); in TEST()
64 EXPECT_THAT(model.GetOutput(), ElementsAreArray({4, 3, 2, 1})); in TEST()
68 ReverseOpModel<float> model({TensorType_FLOAT32, {4, 3, 2}}, in TEST() local
70 model.PopulateTensor<float>(model.input(), in TEST()
73 model.PopulateTensor<int32_t>(model.axis(), {1}); in TEST()
[all …]
Dpack_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
61 PackOpModel<float> model({TensorType_FLOAT32, {2}}, 0, 3); in TEST() local
62 model.SetInput(0, {1, 4}); in TEST()
63 model.SetInput(1, {2, 5}); in TEST()
64 model.SetInput(2, {3, 6}); in TEST()
65 ASSERT_EQ(model.Invoke(), kTfLiteOk); in TEST()
66 EXPECT_THAT(model.GetOutputShape(), ElementsAre(3, 2)); in TEST()
67 EXPECT_THAT(model.GetOutput(), ElementsAreArray({1, 4, 2, 5, 3, 6})); in TEST()
71 PackOpModel<float> model({TensorType_FLOAT32, {2}}, 1, 3); in TEST() local
72 model.SetInput(0, {1, 4}); in TEST()
[all …]
Dfloor_div_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
55 FloorDivModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
58 model.PopulateTensor<int32_t>(model.input1(), {10, 9, 11, 3}); in TEST()
59 model.PopulateTensor<int32_t>(model.input2(), {2, 2, 3, 4}); in TEST()
60 ASSERT_EQ(model.Invoke(), kTfLiteOk); in TEST()
61 EXPECT_THAT(model.GetOutputShape(), ElementsAre(1, 2, 2, 1)); in TEST()
62 EXPECT_THAT(model.GetOutput(), ElementsAre(5, 4, 3, 0)); in TEST()
66 FloorDivModel<int32_t> model({TensorType_INT32, {1, 2, 2, 1}}, in TEST() local
69 model.PopulateTensor<int32_t>(model.input1(), {10, -9, -11, 7}); in TEST()
70 model.PopulateTensor<int32_t>(model.input2(), {2, 2, -3, -4}); in TEST()
[all …]
/external/tensorflow/tensorflow/lite/tools/optimize/
Dmodify_model_interface_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
23 #include "tensorflow/lite/model.h"
31 // Create a model with 1 quant, 1 FC, 1 dequant
34 auto model = std::make_unique<ModelT>(); in CreateQuantizedModelSingleInputOutput() local
44 model->subgraphs.push_back(std::move(subgraph)); in CreateQuantizedModelSingleInputOutput()
47 quant_op_code->builtin_code = BuiltinOperator_QUANTIZE; in CreateQuantizedModelSingleInputOutput()
48 quant_op_code->deprecated_builtin_code = in CreateQuantizedModelSingleInputOutput()
50 quant_op_code->version = 2; in CreateQuantizedModelSingleInputOutput()
52 fc_op_code->builtin_code = BuiltinOperator_FULLY_CONNECTED; in CreateQuantizedModelSingleInputOutput()
53 fc_op_code->deprecated_builtin_code = in CreateQuantizedModelSingleInputOutput()
[all …]
Dquantization_wrapper_utils_custom_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
22 #include "tensorflow/lite/model.h"
34 // Create a model with 1 lstm layer. in TEST()
35 auto model = std::make_unique<ModelT>(); in TEST() local
41 lstm_op_code->builtin_code = BuiltinOperator_LSTM; in TEST()
42 lstm_op_code->deprecated_builtin_code = in TEST()
44 lstm_op_code->version = 2; in TEST()
45 lstm_op->opcode_index = 0; in TEST()
46 lstm_op->inputs = {0, 1, 2, 3, 4, 5, 6, 7, 8, -1, -1, -1, in TEST()
48 lstm_op->outputs = {24}; in TEST()
[all …]
/external/pytorch/torch/onnx/_internal/
Dio_adapter.py1 # mypy: allow-untyped-defs
30 PyTorch model inputs to transform them into the inputs format expected by the
31 exported ONNX model. Each step takes the PyTorch model inputs as arguments and
34 This serves as a base formalized construct for the transformation done to model
42 model: torch.nn.Module | Callable | torch_export.ExportedProgram | None = None,
43 ) -> tuple[Sequence[Any], Mapping[str, Any]]: ...
47 """A class that adapts the PyTorch model inputs to exported ONNX model inputs format."""
52 def append_step(self, step: InputAdaptStep) -> None:
63 model: torch.nn.Module | Callable | torch_export.ExportedProgram | None = None,
65 ) -> Sequence[int | float | bool | str | torch.Tensor | torch.dtype | None]:
[all …]
/external/lottie/lottie/src/main/generated/baselineProfiles/
Dbaseline-prof.txt2 HSPLcom/airbnb/lottie/AsyncUpdates;->$values()[Lcom/airbnb/lottie/AsyncUpdates;
3 HSPLcom/airbnb/lottie/AsyncUpdates;-><clinit>()V
4 HSPLcom/airbnb/lottie/AsyncUpdates;-><init>(Ljava/lang/String;I)V
7 HSPLcom/airbnb/lottie/L;-><clinit>()V
8 HPLcom/airbnb/lottie/L;->beginSection(Ljava/lang/String;)V
9 HPLcom/airbnb/lottie/L;->endSection(Ljava/lang/String;)F
10 HSPLcom/airbnb/lottie/L;->getDisablePathInterpolatorCache()Z
12 HSPLcom/airbnb/lottie/LottieComposition;-><init>()V
13 HPLcom/airbnb/lottie/LottieComposition;->getBounds()Landroid/graphics/Rect;
14 HPLcom/airbnb/lottie/LottieComposition;->getCharacters()Landroidx/collection/SparseArrayCompat;
[all …]
/external/tensorflow/tensorflow/python/keras/
Dmodels.py7 # http://www.apache.org/licenses/LICENSE-2.0
15 # pylint: disable=protected-access
16 """Code for model cloning, plus model-related API entries."""
41 Model = training.Model # pylint: disable=invalid-name variable
42 Sequential = sequential.Sequential # pylint: disable=invalid-name
43 Functional = functional.Functional # pylint: disable=invalid-name
60 def _insert_ancillary_layers(model, ancillary_layers, metrics_names, new_nodes): argument
61 """Inserts ancillary layers into the model with the proper order."""
70 model._insert_layers(ancillary_layers, relevant_nodes=list(new_nodes))
79 layer_map: Map from layers in `model` to new layers.
[all …]
/external/llvm/test/Analysis/CostModel/X86/
Dalternate-shuffle-cost.ll1 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2,-ssse3 -cost-model -analyze | FileCh…
2 … RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2,+sse3,+ssse3 -cost-model -analyze | …
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -cost-model -analyze | FileCheck %s
4 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7-avx -cost-model -analyze | FileCheck…
5 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=core-avx2 -cost-model -analyze | FileCheck …
8 ; Verify the cost model for alternate shuffles.
10 ; shufflevector instructions with illegal 64-bit vector types.
11 ; 64-bit packed integer vectors (v2i32) are promoted to type v2i64.
12 ; 64-bit packed float vectors (v2f32) are widened to type v4f32.
18 ; CHECK: Printing analysis 'Cost Model Analysis' for function 'test_v2i32':
[all …]
/external/pytorch/test/quantization/eager/
Dtest_quantize_eager_ptq.py84 def __init__(self) -> None:
97 def __init__(self) -> None:
136 # quantize the reference model
206 def __init__(self) -> None:
240 quant_min=-1 * (2 ** 15),
241 quant_max=(2 ** 15) - 1,
246 quant_min=-1 * (2 ** 15),
247 quant_max=(2 ** 15) - 1,
251 # quantize the reference model
264 quant_min=-1 * (2 ** 15),
[all …]
/external/python/google-api-python-client/docs/epy/
Dapi-objects.txt1 googleapiclient googleapiclient-module.html
2 googleapiclient.__package__ googleapiclient-module.html#__package__
3 googleapiclient._auth googleapiclient._auth-module.html
4 googleapiclient._auth.apply_credentials googleapiclient._auth-module.html#apply_credentials
5 googleapiclient._auth.HAS_GOOGLE_AUTH googleapiclient._auth-module.html#HAS_GOOGLE_AUTH
6 googleapiclient._auth.google_auth_httplib2 googleapiclient._auth-module.html#google_auth_httplib2
7 googleapiclient._auth.__package__ googleapiclient._auth-module.html#__package__
8 googleapiclient._auth.is_valid googleapiclient._auth-module.html#is_valid
9 googleapiclient._auth.default_credentials googleapiclient._auth-module.html#default_credentials
10 googleapiclient._auth.get_credentials_from_http googleapiclient._auth-module.html#get_credentials_f…
[all …]
/external/tensorflow/tensorflow/lite/delegates/gpu/gl/kernels/
Delementwise_test.cc7 http://www.apache.org/licenses/LICENSE-2.0
45 SingleOpModel model({/*type=*/ToString(op_type), /*attributes=*/{}}, in TEST() local
48 ASSERT_TRUE(model.PopulateTensor(0, {0.0, -6.2, 2.0, 4.0})); in TEST()
49 ASSERT_OK(model.Invoke(*NewElementwiseNodeShader(op_type))); in TEST()
50 EXPECT_THAT(model.GetOutput(0), in TEST()
51 Pointwise(FloatNear(1e-6), {0.0, 6.2, 2.0, 4.0})); in TEST()
57 SingleOpModel model({/*type=*/ToString(op_type), /*attributes=*/{}}, in TEST() local
60 ASSERT_TRUE(model.PopulateTensor(0, {0.0, 3.1415926, -3.1415926, 1})); in TEST()
61 ASSERT_OK(model.Invoke(*NewElementwiseNodeShader(op_type))); in TEST()
62 EXPECT_THAT(model.GetOutput(0), in TEST()
[all …]
/external/tensorflow/tensorflow/python/keras/saving/
Dsaving_utils.py7 # http://www.apache.org/licenses/LICENSE-2.0
15 """Utils related to keras model saving."""
34 def extract_model_metrics(model): argument
35 """Convert metrics from a Keras model `compile` API to dictionary.
40 model: A `tf.keras.Model` object.
44 the model does not contain any metrics.
46 if getattr(model, '_compile_metrics', None):
47 # TODO(psv/kathywu): use this implementation in model to estimator flow.
48 # We are not using model.metrics here because we want to exclude the metrics
50 return {m.name: m for m in model._compile_metric_functions} # pylint: disable=protected-access
[all …]
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dgroup_bidirectional_sequence_ops.cc7 http://www.apache.org/licenses/LICENSE-2.0
25 #include "tensorflow/lite/toco/model.h"
32 Model* model, const Operator& op) { in FindOperator() argument
34 model->operators.begin(), model->operators.end(), in FindOperator()
38 bool MatchTwoUnpackOps(const Operator& op, const Model& model, in MatchTwoUnpackOps() argument
44 *fw_output = GetOpWithOutput(model, op.inputs[0]); in MatchTwoUnpackOps()
45 *bw_output = GetOpWithOutput(model, op.inputs[1]); in MatchTwoUnpackOps()
50 if ((*fw_output)->type != OperatorType::kUnpack || in MatchTwoUnpackOps()
51 (*bw_output)->type != OperatorType::kUnpack) { in MatchTwoUnpackOps()
60 bool MatchDynamicBidirectionalSequenceOutputs(Operator* op, const Model& model, in MatchDynamicBidirectionalSequenceOutputs() argument
[all …]
/external/google-cloud-java/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/
DUpdateModelRequestOrBuilder.java8 * https://www.apache.org/licenses/LICENSE-2.0
30 * Required. The Model which replaces the resource on the server.
31 * When Model Versioning is enabled, the model.name will be used to determine
32 * whether to update the model or model version.
33 * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
35 * 2. model.name without the &#64; value, e.g. models/123, refers to a model
37 * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
38 * 4. Supported model fields: display_name, description; supported
39 * version-specific fields: version_description. Labels are supported in both
40 * scenarios. Both the model labels and the version labels are merged when a
[all …]
DUpdateModelRequest.java8 * https://www.apache.org/licenses/LICENSE-2.0
70 private com.google.cloud.aiplatform.v1.Model model_;
75 * Required. The Model which replaces the resource on the server.
76 * When Model Versioning is enabled, the model.name will be used to determine
77 * whether to update the model or model version.
78 * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
80 * 2. model.name without the &#64; value, e.g. models/123, refers to a model
82 * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
83 * 4. Supported model fields: display_name, description; supported
84 * version-specific fields: version_description. Labels are supported in both
[all …]
/external/google-cloud-java/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/
DUpdateModelRequestOrBuilder.java8 * https://www.apache.org/licenses/LICENSE-2.0
30 * Required. The Model which replaces the resource on the server.
31 * When Model Versioning is enabled, the model.name will be used to determine
32 * whether to update the model or model version.
33 * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
35 * 2. model.name without the &#64; value, e.g. models/123, refers to a model
37 * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
38 * 4. Supported model fields: display_name, description; supported
39 * version-specific fields: version_description. Labels are supported in both
40 * scenarios. Both the model labels and the version labels are merged when a
[all …]
DUpdateModelRequest.java8 * https://www.apache.org/licenses/LICENSE-2.0
70 private com.google.cloud.aiplatform.v1beta1.Model model_;
75 * Required. The Model which replaces the resource on the server.
76 * When Model Versioning is enabled, the model.name will be used to determine
77 * whether to update the model or model version.
78 * 1. model.name with the &#64; value, e.g. models/123&#64;1, refers to a version
80 * 2. model.name without the &#64; value, e.g. models/123, refers to a model
82 * 3. model.name with &#64;-, e.g. models/123&#64;-, refers to a model update.
83 * 4. Supported model fields: display_name, description; supported
84 * version-specific fields: version_description. Labels are supported in both
[all …]
/external/android-nn-driver/1.0/
DHalPolicy.cpp2 // Copyright © 2017-2023 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
18 bool HalPolicy::ConvertOperation(const Operation& operation, const Model& model, ConversionData& da… in ConvertOperation() argument
23 return ConvertElementwiseBinary(operation, model, data, armnn::BinaryOperation::Add); in ConvertOperation()
25 return ConvertAveragePool2d(operation, model, data); in ConvertOperation()
27 return ConvertConcatenation(operation, model, data); in ConvertOperation()
29 return ConvertConv2d(operation, model, data); in ConvertOperation()
31 return ConvertDepthToSpace(operation, model, data); in ConvertOperation()
33 return ConvertDepthwiseConv2d(operation, model, data); in ConvertOperation()
35 return ConvertDequantize(operation, model, data); in ConvertOperation()
[all …]
/external/pytorch/torch/onnx/_internal/exporter/
D_capture_strategies.py3 # mypy: allow-untyped-defs
21 def _verbose_printer(verbose: bool | None) -> Callable[..., None]:
28 def _take_first_line(text: str) -> str:
44 def success(self) -> bool:
51 …To use a strategy, create an instance and call it with the model, args, kwargs, and dynamic_shapes.
55 result = strategy(model, args, kwargs, dynamic_shapes)
76 "%Y-%m-%d_%H-%M-%S-%f"
81 model: torch.nn.Module | torch.jit.ScriptFunction,
85 ) -> Result:
86 self._enter(model)
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/naming/
DNameLogicTestingJss060Test.java32 names.forEach(n -> { in classifyRoles()
44 names.forEach(n -> { in classifyReferences()
53 classifyRoles("java-symbol-solver-core", in classifyRoleToFileToCoreSourceFileInfoExtractor()
59 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/core/resolution/Conte… in classifyRolesCoreCoreResolution()
60 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/core/resolution/Conte… in classifyRolesCoreCoreResolution()
65 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/declarations/common/M… in classifyRolesCoreDeclarationsCommon()
70 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/javaparser/Navigator"… in classifyRolesCoreJavaparserNavigator()
75 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/javaparsermodel/Defau… in classifyRolesCoreJavaparsermodel()
76 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/javaparsermodel/JavaP… in classifyRolesCoreJavaparsermodel()
77 …classifyRoles("java-symbol-solver-core", "com/github/javaparser/symbolsolver/javaparsermodel/JavaP… in classifyRolesCoreJavaparsermodel()
[all …]

12345678910>>...63