Home
last modified time | relevance | path

Searched full:squeeze (Results 1 – 25 of 1217) sorted by relevance

12345678910>>...49

/aosp_15_r20/external/executorch/backends/arm/test/ops/
H A Dtest_squeeze.py8 # Tests the squeeze op which squeezes a given dimension with size 1 into a lower ranked tensor.
32 return x.squeeze(dim)
42 return x.squeeze(dims)
44 class Squeeze(torch.nn.Module): class in TestSqueeze
52 return x.squeeze()
115 @parameterized.expand(Squeeze.test_parameters)
121 self.Squeeze(), (test_tensor,), "torch.ops.aten.squeeze.default"
124 @parameterized.expand(Squeeze.test_parameters)
130 self.Squeeze(), (test_tensor,), "torch.ops.aten.squeeze.default"
133 @parameterized.expand(Squeeze.test_parameters)
[all …]
/aosp_15_r20/external/apache-commons-lang/src/test/java/org/apache/commons/lang3/
H A DCharSetUtilsTest.java47 assertNull(CharSetUtils.squeeze(null, (String) null)); in testSqueeze_StringString()
48 assertNull(CharSetUtils.squeeze(null, "")); in testSqueeze_StringString()
50 assertEquals("", CharSetUtils.squeeze("", (String) null)); in testSqueeze_StringString()
51 assertEquals("", CharSetUtils.squeeze("", "")); in testSqueeze_StringString()
52 assertEquals("", CharSetUtils.squeeze("", "a-e")); in testSqueeze_StringString()
54 assertEquals("hello", CharSetUtils.squeeze("hello", (String) null)); in testSqueeze_StringString()
55 assertEquals("hello", CharSetUtils.squeeze("hello", "")); in testSqueeze_StringString()
56 assertEquals("hello", CharSetUtils.squeeze("hello", "a-e")); in testSqueeze_StringString()
57 assertEquals("helo", CharSetUtils.squeeze("hello", "l-p")); in testSqueeze_StringString()
58 assertEquals("heloo", CharSetUtils.squeeze("helloo", "l")); in testSqueeze_StringString()
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/ragged/
H A Dragged_squeeze_op.py15 """Operator Squeeze for RaggedTensors."""
30 def squeeze(input: ragged_tensor.Ragged, axis=None, name=None): # pylint: disable=redefined-builtin function
31 """Ragged compatible squeeze.
33 If `input` is a `tf.Tensor`, then this calls `tf.squeeze`.
39 input: A potentially ragged tensor. The input to squeeze.
42 ragged and axis is []. If `input` is not ragged it calls tf.squeeze. Note
43 that it is an error to squeeze a dimension that is not 1. It must be in
54 return array_ops.squeeze(input, axis, name)
57 raise ValueError('Ragged.squeeze must have an axis argument.')
101 squeezed_rt = array_ops.squeeze(squeezed_rt, dense_dims)
[all …]
H A Dragged_squeeze_op_test.py15 """Tests for ragged.squeeze."""
47 rt = ragged_squeeze_op.squeeze(
49 dt = array_ops.squeeze(constant_op.constant(input_list), squeeze_ranks)
107 rt = ragged_squeeze_op.squeeze(
109 dt = array_ops.squeeze(constant_op.constant(input_list), squeeze_ranks)
163 rt_s = ragged_squeeze_op.squeeze(rt, squeeze_ranks)
164 dt_s = array_ops.squeeze(dt, squeeze_ranks)
181 rt_s = ragged_squeeze_op.squeeze(rt, squeeze_ranks)
199 rt_s = ragged_squeeze_op.squeeze(rt, [0, 1, 3, 6, 7])
243 ragged_squeeze_op.squeeze(
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/lite/tests/
H A Ddilated-conv.mlir157 %3 = "tf.Squeeze"(%2) {squeeze_dims = [3]} : (tensor<4x64x64x1xf32>) -> tensor<4x64x64xf32>
167 …// CHECK-NEXT: [[SQUEEZE:%.*]] = "tf.Squeeze"([[CONV]]) {squeeze_dims = [3]} : (tensor<1x128x128x1…
168 …// CHECK-NEXT: [[RESULT:%.*]] = "tf.BiasAdd"([[SQUEEZE]], [[BIAS]]) : (tensor<1x128x128xf32>, tens…
180 %3 = "tf.Squeeze"(%2) {squeeze_dims = [3]} : (tensor<4x64x64x1xf32>) -> tensor<4x64x64xf32>
190 …// CHECK-NEXT: [[SQUEEZE:%.*]] = "tf.Squeeze"([[CONV]]) {squeeze_dims = [3]} : (tensor<1x128x128x1…
191 …// CHECK-NEXT: [[RESULT:%.*]] = "tf.BiasAdd"([[SQUEEZE]], [[BIAS]]) : (tensor<1x128x128xf32>, tens…
203 %3 = "tf.Squeeze"(%2) {squeeze_dims = [3]} : (tensor<4x?x?x1xf32>) -> tensor<4x?x?xf32>
213 …// CHECK-NEXT: [[SQUEEZE:%.*]] = "tf.Squeeze"([[CONV]]) {squeeze_dims = [3]} : (tensor<1x128x128x1…
214 …// CHECK-NEXT: [[RESULT:%.*]] = "tf.BiasAdd"([[SQUEEZE]], [[BIAS]]) : (tensor<1x128x128xf32>, tens…
226 %3 = "tf.Squeeze"(%2) {squeeze_dims = [3]} : (tensor<4x?x?x1xf32>) -> tensor<4x?x?xf32>
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/array_ops/
H A Dshape_ops_test.py275 np_ans = np.squeeze(x, axis=tuple(squeeze_dims))
276 tensor = array_ops.squeeze(x, squeeze_dims)
279 np_ans = np.squeeze(x)
280 tensor = array_ops.squeeze(x)
292 # Nothing to squeeze.
296 # Squeeze the middle element away.
299 # Squeeze on both ends.
304 # Nothing to squeeze.
308 # Squeeze the middle element away.
311 # Squeeze on both ends.
[all …]
/aosp_15_r20/packages/modules/NeuralNetworks/runtime/test/generated/spec_V1_1/
Dsqueeze.example.cpp1 // Generated from squeeze.mod.py
7 namespace generated_tests::squeeze { namespace
44 .type = TestOperationType::SQUEEZE, in get_test_model()
60 const auto dummy_test_model = TestModelManager::get().add("squeeze", get_test_model());
62 } // namespace generated_tests::squeeze
64 namespace generated_tests::squeeze { namespace
135 .type = TestOperationType::SQUEEZE, in get_test_model_all_inputs_as_internal()
153 } // namespace generated_tests::squeeze
155 namespace generated_tests::squeeze { namespace
192 .type = TestOperationType::SQUEEZE, in get_test_model_all_tensors_as_inputs()
[all …]
/aosp_15_r20/external/pytorch/test/torch_np/numpy_tests/lib/
H A Dtest_shape_base_.py191 return np.squeeze(np.sum(x, keepdims=True))
310 assert_(np.squeeze(b).shape == s)
698 assert_array_equal(np.squeeze(a), np.reshape(a, (20, 10, 10)))
699 assert_array_equal(np.squeeze(b), np.reshape(b, (20, 10, 20)))
700 assert_array_equal(np.squeeze(c), np.reshape(c, (20, 10)))
704 res = np.squeeze(a)
712 assert aa.squeeze().tensor._base is aa.tensor
716 assert_equal(np.squeeze(A).shape, (3, 3))
717 assert_equal(np.squeeze(A, axis=()), A)
719 assert_equal(np.squeeze(np.zeros((1, 3, 1))).shape, (3,))
[all …]
/aosp_15_r20/packages/modules/NeuralNetworks/common/cpu_operations/
DSqueeze.cpp21 #include "Squeeze.h"
31 namespace squeeze { namespace
35 // Only the squeeze dims tensor can be omitted. in prepare()
76 // Handle edge case where squeeze removes all dimensions. in prepare()
102 NN_RET_CHECK_FAIL() << "Unsupported tensor type for SQUEEZE op."; in execute()
107 } // namespace squeeze
109 NN_REGISTER_OPERATION_DEFAULT_VALIDATION(SQUEEZE, squeeze::prepare, squeeze::execute,
/aosp_15_r20/external/tensorflow/tensorflow/python/compiler/tensorrt/test/
H A Dtrt_mode_test.py27 """Test squeeze on batch dim and some unary operations in TF-TRT."""
33 q = array_ops.squeeze(q, 0)
39 # Squeeze op produces dynamic shaped values. Therefore, we don't run the
46 """The input has 1 as a first dimension, which is removed by the squeeze.
51 it is possible to manipulate the batch dimension using the squeeze op.
54 allowed to manipulate (squeeze) the first dimension in implicit batch mode.
83 The squeeze op is not converted by TensorRT in implicit batch mode.
85 subgraph before 'squeeze(q,0)', and another one for the rest of the ops
86 after the 'squeeze(q,0)'.
H A Dunary_test.py38 q = array_ops.squeeze(q, axis=-2)
44 q = array_ops.squeeze(q, axis=3)
70 q = array_ops.squeeze(q, axis=[-1, -2, 3])
75 q = array_ops.squeeze(q, axis=[5, 2, 3])
87 return array_ops.squeeze(q, name="output_0")
100 # Final squeeze and div ops are not converted. The x1 and x2 branches
/aosp_15_r20/external/tensorflow/tensorflow/core/grappler/optimizers/
H A Dgeneric_layout_optimizer_transposer_test.cc2049 auto squeeze_op = ops::Squeeze( in TEST_F()
2050 scope.WithOpName("squeeze").WithDevice("/device:GPU:0"), conv2d); in TEST_F()
2064 auto* squeeze = context.graph_view->GetNode("squeeze"); in TEST_F() local
2065 ASSERT_NE(squeeze, nullptr); in TEST_F()
2066 TF_ASSERT_OK(squeeze_transposer.TransposeNode(&context, squeeze)); in TEST_F()
2069 "squeeze-0-TransposeNHWCToNCHW-LayoutOptimizer"); in TEST_F()
2075 auto* squeeze_node = context.graph_view->GetNode("squeeze"); in TEST_F()
2081 "squeeze-0-0-TransposeNCHWToNHWC-LayoutOptimizer"); in TEST_F()
2104 auto squeeze_op = ops::Squeeze( in TEST_F()
2105 scope.WithOpName("squeeze").WithDevice("/device:GPU:0"), conv2d); in TEST_F()
[all …]
/aosp_15_r20/external/sdv/vsomeip/third_party/boost/numeric/ublas/test/tensor/
Dtest_extents.cpp353 …_extents_squeeze, fixture, *boost::unit_test::label("extents") *boost::unit_test::label("squeeze"))
357 auto e0 = extents[ 0].squeeze(); // {}
358 auto e1 = extents[ 1].squeeze(); // {1,1}
359 auto e2 = extents[ 2].squeeze(); // {1,2}
360 auto e3 = extents[ 3].squeeze(); // {2,1}
362 auto e4 = extents[ 4].squeeze(); // {2,3}
363 auto e5 = extents[ 5].squeeze(); // {2,3}
364 auto e6 = extents[ 6].squeeze(); // {2,3}
365 auto e7 = extents[ 7].squeeze(); // {2,3}
366 auto e8 = extents[ 8].squeeze(); // {2,3}
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/keras/utils/
H A Dlosses_utils.py93 """Squeeze last dim if ranks differ from expected by exactly 1.
96 defaults to 0, and we squeeze the last dimension of the larger rank if they
101 `labels`, so `expected_rank_diff` would be 1. In this case, we'd squeeze
131 predictions = array_ops.squeeze(predictions, [-1])
134 labels = array_ops.squeeze(labels, [-1])
143 lambda: array_ops.squeeze(predictions, [-1]),
149 lambda: array_ops.squeeze(labels, [-1]),
155 """Squeeze or expand last dimension if needed.
215 sample_weight = array_ops.squeeze(sample_weight, [-1])
223 maybe_squeeze_weights = lambda: array_ops.squeeze(sample_weight, [-1])
[all …]
/aosp_15_r20/external/curl/m4/
H A Dcurl-compilers.m4412 squeeze CFLAGS
427 squeeze CPPFLAGS
630 squeeze tmp_CPPFLAGS
631 squeeze tmp_CFLAGS
637 squeeze CPPFLAGS
638 squeeze CFLAGS
686 squeeze CPPFLAGS
687 squeeze CFLAGS
756 squeeze CPPFLAGS
757 squeeze CFLAGS
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
H A Ddilated_conv.h52 // SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> BatchToSpaceND -> BiasAdd
54 // SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> Pad -> BatchToSpaceND ->
57 // SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> BiasAdd -> BatchToSpaceND
64 // The Expand/Squeeze combination is used to adapt a 3D array (such as in
116 // by `Squeeze` op. in matchAndRewrite()
165 // Expand + Squeeze op. in matchAndRewrite()
168 // Expand/Squeeze op must come in pair. in matchAndRewrite()
204 squeeze_op, "squeeze dims should have exactly 1 dimension specified"); in matchAndRewrite()
208 // Always squeeze 4D input to 3D input. in matchAndRewrite()
213 op, "squeeze axis and expand axis doesn't match"); in matchAndRewrite()
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/third_party/cares/cares/m4/
Dcares-compilers.m4437 squeeze CFLAGS
452 squeeze CPPFLAGS
670 squeeze tmp_CPPFLAGS
671 squeeze tmp_CFLAGS
677 squeeze CPPFLAGS
678 squeeze CFLAGS
732 squeeze CPPFLAGS
733 squeeze CFLAGS
813 squeeze CPPFLAGS
814 squeeze CFLAGS
[all …]
/aosp_15_r20/external/pytorch/third_party/
H A Dbuild_bundled.py77 def squeeze(t): function
89 txt = squeeze(txt)
120 elif squeeze("Clarified Artistic License") in txt:
122 elif all([squeeze(m) in txt.lower() for m in bsd3_txt]):
124 elif all([squeeze(m) in txt.lower() for m in bsd3_v1_txt]):
126 elif all([squeeze(m) in txt.lower() for m in bsd2_txt]):
128 elif all([squeeze(m) in txt.lower() for m in bsd3_src_txt]):
130 elif any([squeeze(m) in txt.lower() for m in mit_txt]):
/aosp_15_r20/external/apache-commons-lang/src/main/java/org/apache/commons/lang3/
H A DCharSetUtils.java188 * CharSetUtils.squeeze(null, *) = null
189 * CharSetUtils.squeeze("", *) = ""
190 * CharSetUtils.squeeze(*, null) = *
191 * CharSetUtils.squeeze(*, "") = *
192 * CharSetUtils.squeeze("hello", "k-p") = "helo"
193 * CharSetUtils.squeeze("hello", "a-e") = "hello"
197 * @param str the string to squeeze, may be null
201 public static String squeeze(final String str, final String... set) { in squeeze() method in CharSetUtils
/aosp_15_r20/packages/modules/NeuralNetworks/common/types/operations/src/
DSqueeze.cpp17 #include "Squeeze.h"
22 namespace squeeze { namespace
32 << "Unsupported input operand type for SQUEEZE op: " << inputType; in validate()
55 } // namespace squeeze
57 NN_DEFINE_VALIDATION_FUNCTION(SQUEEZE, squeeze::validate);
/aosp_15_r20/external/tensorflow/tensorflow/lite/toco/graph_transformations/
H A Didentify_dilated_conv.cc39 // SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> BatchToSpaceND -> BiasAdd
41 // Pad -> SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> BatchToSpaceND ->
44 // SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> Pad -> BatchToSpaceND ->
47 // SpaceToBatchND -> Expand -> Conv2D -> Squeeze -> BiasAdd -> BatchToSpaceND
54 // The Expand/Squeeze combination is used to adapt a 3D array (such as in
70 // Squeeze Op in ResolveDilatedConv()
77 // If an expand op was used, the post-conv op must be a squeeze op in ResolveDilatedConv()
127 // Squeeze -> BatchToSpaceND -> BiasAdd So eliminate this Pad Op as well in ResolveDilatedConv()
/aosp_15_r20/external/pytorch/torch/ao/pruning/_experimental/data_sparsifier/
H A Ddata_norm_sparsifier.py116 mask.squeeze(0).squeeze(0)[:height, :width].contiguous()
154 mask = mask.squeeze(0).squeeze(0)[
156 ] # squeeze only the first 2 dimension
172 data_norm = torch.abs(data).squeeze() # absolute value based (L1)
174 data_norm = (data * data).squeeze() # square every element for L2
/aosp_15_r20/external/tensorflow/tensorflow/dtensor/mlir/expansions/
H A Drandom_op_spmd_expander.cc79 // computation in the current cluster. First we search for a Squeeze with the
85 // to use as the attribute attached to the squeeze op. in GetDeviceSeed()
102 for (mlir::TF::SqueezeOp squeeze : cluster.getOps<mlir::TF::SqueezeOp>()) in GetDeviceSeed()
103 if (squeeze->hasAttrOfType<mlir::DenseIntElementsAttr>( in GetDeviceSeed()
106 squeeze in GetDeviceSeed()
111 return squeeze.output(); in GetDeviceSeed()
159 mlir::TF::SqueezeOp squeeze = builder.create<mlir::TF::SqueezeOp>( in GetDeviceSeed() local
164 squeeze->setAttr(kDeviceSeedForMeshDims, in GetDeviceSeed()
167 return squeeze.output(); in GetDeviceSeed()
/aosp_15_r20/external/executorch/backends/arm/_passes/
H A Dconv1d_unsqueeze_pass.py32 4) squeeze the output back down to 3d.
33 5) if all users of squeeze are quantized, insert q/dq-pair before squeeze
121 # c. Add unsqueeze to input (3d -> 4d) and squeeze to output (4d -> 3d)
122 # unsqueeze -> conv2d -> squeeze
154 # If quantized, insert conv2d --> q --> dq --> squeeze
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/
H A Dconfusion_matrix.py30 """Squeeze last dim if ranks differ from expected by exactly 1.
33 defaults to 0, and we squeeze the last dimension of the larger rank if they
38 `labels`, so `expected_rank_diff` would be 1. In this case, we'd squeeze
67 predictions = array_ops.squeeze(predictions, [-1])
70 labels = array_ops.squeeze(labels, [-1])
79 lambda: array_ops.squeeze(predictions, [-1]),
85 lambda: array_ops.squeeze(labels, [-1]),

12345678910>>...49