Home
last modified time | relevance | path

Searched refs:tensor_shape (Results 1 – 25 of 973) sorted by relevance

12345678910>>...39

/external/tensorflow/tensorflow/python/framework/
Dtensor_shape_test.py21 from tensorflow.python.framework import tensor_shape
29 dim = tensor_shape.Dimension(12)
32 self.assertEqual(dim, tensor_shape.Dimension(12))
34 tensor_shape.Dimension(15), dim + tensor_shape.Dimension(3))
35 self.assertEqual(tensor_shape.Dimension(15), dim + 3)
36 self.assertEqual(tensor_shape.Dimension(15), 3 + dim)
37 self.assertEqual(tensor_shape.Dimension(9), dim - 3)
38 self.assertEqual(tensor_shape.Dimension(1), 13 - dim)
40 tensor_shape.Dimension(24), dim * tensor_shape.Dimension(2))
41 self.assertEqual(tensor_shape.Dimension(24), dim * 2)
[all …]
Dcommon_shapes_test.py20 from tensorflow.python.framework import tensor_shape
62 s1 = tensor_shape.TensorShape([5])
63 s2 = tensor_shape.TensorShape([7])
65 unknown = tensor_shape.unknown_shape()
66 scalar = tensor_shape.TensorShape([])
67 expanded_scalar = tensor_shape.TensorShape([1])
88 unknown = tensor_shape.unknown_shape()
89 shape_0 = tensor_shape.TensorShape([])
90 shape_1 = tensor_shape.TensorShape([1])
91 shape_4 = tensor_shape.TensorShape([4])
[all …]
Dop_def_util_test.py27 from tensorflow.python.framework import tensor_shape
45 ("shape", tensor_shape.TensorShape([3]), tensor_shape.TensorShape([3])),
46 ("shape", [3], tensor_shape.TensorShape([3])),
64 ("list(shape)", [tensor_shape.TensorShape([3]), [4, 5]],
65 [tensor_shape.TensorShape([3]), tensor_shape.TensorShape([4, 5])]),
111 tensor_shape.TensorShape([3, 4])),
/external/tensorflow/tensorflow/python/ops/
Dinit_ops_test.py23 from tensorflow.python.framework import tensor_shape as tensor_shape_lib
56 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
59 tensor_shape,
67 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
70 tensor_shape,
77 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
80 tensor_shape,
88 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
91 tensor_shape,
99 for tensor_shape in [shape, tensor_shape_lib.TensorShape(shape)]:
[all …]
/external/armnn/python/pyarmnn/test/
Dtest_tensor_shape.py8 tensor_shape = ann.TensorShape((1, 2, 3))
10 assert 3 == tensor_shape.GetNumDimensions()
11 assert 6 == tensor_shape.GetNumElements()
15 tensor_shape = ann.TensorShape((10,))
16 assert 1 == tensor_shape.GetNumDimensions()
17 assert 10 == tensor_shape.GetNumElements()
28 tensor_shape = ann.TensorShape((1, "2", 3.0))
30 assert 3 == tensor_shape.GetNumDimensions()
31 assert 6 == tensor_shape.GetNumElements()
58 tensor_shape = ann.TensorShape((1, 2, 3))
[all …]
/external/tensorflow/tensorflow/python/grappler/
Ddatasets_test.py24 from tensorflow.python.framework import tensor_shape
35 'shape': tensor_shape.TensorShape([])
38 'shape': tensor_shape.TensorShape([3])
41 'shape': tensor_shape.TensorShape([1, 3])
60 'shape': tensor_shape.TensorShape([])
63 'shape': tensor_shape.TensorShape([3])
66 'shape': tensor_shape.TensorShape([1, 3])
85 'shape': tensor_shape.TensorShape([])
88 'shape': tensor_shape.TensorShape([3])
91 'shape': tensor_shape.TensorShape([1, 3])
[all …]
/external/ComputeLibrary/arm_compute/core/utils/misc/
DShapeCalculator.h57 TensorShape out_shape = input->tensor_shape(); in calculate_reduce_mean_shape()
111 TensorShape output_shape = input.tensor_shape(); in compute_permutation_output_shape()
130 …ARM_COMPUTE_ERROR_ON_MSG((input.tensor_shape()[idx_width] % stride != 0), "The width of the input … in compute_reorg_output_shape()
131 …ARM_COMPUTE_ERROR_ON_MSG((input.tensor_shape()[idx_height] % stride != 0), "The height of the inpu… in compute_reorg_output_shape()
133 TensorShape output_shape{ input.tensor_shape() }; in compute_reorg_output_shape()
158 TensorShape weights_reshaped{ weights.tensor_shape() };
202 TensorShape lhs_shape{ a.tensor_shape() };
246 TensorShape rhs_shape{ a.tensor_shape() }; in compute_rhs_reshaped_shape()
266 TensorShape shape_interleaved_a{ a.tensor_shape() };
300 TensorShape shape_transposed1xW_b{ b.tensor_shape() }; in compute_transpose1xW_shape()
[all …]
/external/tensorflow/tensorflow/python/data/util/
Dsparse_test.py29 from tensorflow.python.framework import tensor_shape
65 ("TestCase_1", lambda: tensor_shape.TensorShape([]), lambda: ops.Tensor,
66 lambda: tensor_shape.TensorShape([])),
69 lambda: tensor_shape.TensorShape([]),
71 lambda: tensor_shape.unknown_shape() # pylint: disable=unnecessary-lambda
73 ("TestCase_3", lambda: (tensor_shape.TensorShape([])), lambda:
74 (ops.Tensor), lambda: (tensor_shape.TensorShape([]))),
77 lambda: (tensor_shape.TensorShape([])),
79 lambda: (tensor_shape.unknown_shape()) # pylint: disable=unnecessary-lambda
81 ("TestCase_5", lambda: (tensor_shape.TensorShape([]), ()), lambda:
[all …]
/external/ComputeLibrary/src/core/CL/kernels/
DCLSelectKernel.cpp51 …const bool is_same_rank = (c->tensor_shape().num_dimensions() == x->tensor_shape().num_dimensions(… in validate_arguments()
52 ARM_COMPUTE_RETURN_ERROR_ON(is_same_rank && (x->tensor_shape() != c->tensor_shape())); in validate_arguments()
53 …R_ON(!is_same_rank && ((c->tensor_shape().num_dimensions() > 1) || (c->tensor_shape().x() != x->te… in validate_arguments()
80 …_has_same_rank = (c->info()->tensor_shape().num_dimensions() == x->info()->tensor_shape().num_dime… in configure()
100 const bool is_input_rank_greater_than_two = x->info()->tensor_shape().num_dimensions() > 2; in configure()
103 const size_t width = x->info()->tensor_shape().x(); in configure()
104 const size_t height = x->info()->tensor_shape().y(); in configure()
105 …const size_t outer_size = x->info()->tensor_shape()[x->info()->tensor_shape().num_dimensions() - 1… in configure()
106 … const size_t depth_size = x->info()->tensor_shape().total_size() / (width * height * outer_size); in configure()
/external/ComputeLibrary/src/core/
DSubTensorInfo.cpp63 SubTensorInfo::SubTensorInfo(ITensorInfo *parent, TensorShape tensor_shape, Coordinates coords, boo… in SubTensorInfo() argument
64 …: _parent(parent), _tensor_shape(tensor_shape), _dims_state(), _coords(coords), _valid_region{ Coo… in SubTensorInfo()
69 if(parent->tensor_shape().total_size() != 0 && !_extend_parent)
71 ARM_COMPUTE_ERROR_ON_INVALID_SUBTENSOR(parent->tensor_shape(), coords, tensor_shape);
94 if(_parent->tensor_shape().total_size() != 0 && !_extend_parent) in set_tensor_shape()
96 ARM_COMPUTE_ERROR_ON_INVALID_SUBTENSOR(_parent->tensor_shape(), _coords, shape); in set_tensor_shape()
102 … TensorShape parent_extended_shape = extend_parent_shape(_parent->tensor_shape(), shape, _coords); in set_tensor_shape()
138 ARM_COMPUTE_ERROR_ON(_parent->tensor_shape().x() != tensor_shape().x()); in extend_padding()
142 ARM_COMPUTE_ERROR_ON(_parent->tensor_shape().y() != tensor_shape().y()); in extend_padding()
DTensorInfo.cpp49 _tensor_shape = info.tensor_shape(); in TensorInfo()
70 _tensor_shape = info.tensor_shape(); in TensorInfo()
93 TensorInfo::TensorInfo(const TensorShape &tensor_shape, Format format) in TensorInfo() argument
96 init(tensor_shape, format); in TensorInfo()
105 TensorInfo::TensorInfo(const TensorShape &tensor_shape, size_t num_channels, DataType data_type) in TensorInfo() argument
108 init(tensor_shape, num_channels, data_type); in TensorInfo()
111 TensorInfo::TensorInfo(const TensorShape &tensor_shape, size_t num_channels, DataType data_type, Qu… in TensorInfo() argument
114 init(tensor_shape, num_channels, data_type); in TensorInfo()
118 TensorInfo::TensorInfo(const TensorShape &tensor_shape, size_t num_channels, DataType data_type, Da… in TensorInfo() argument
121 init(tensor_shape, num_channels, data_type); in TensorInfo()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/
Dshape_util.cc89 TensorShape* tensor_shape) { in XLAShapeToTensorShape() argument
95 *tensor_shape = TensorShape(); in XLAShapeToTensorShape()
97 tensor_shape->AddDim(shape.dimensions(i)); in XLAShapeToTensorShape()
104 const PartialTensorShape& tensor_shape, in TensorShapeToXLAShape() argument
108 *shape = TensorShapeToXLAShape(type, tensor_shape); in TensorShapeToXLAShape()
113 const PartialTensorShape& tensor_shape) { in TensorShapeToXLAShape() argument
114 if (tensor_shape.unknown_rank()) { in TensorShapeToXLAShape()
118 int rank = tensor_shape.dims(); in TensorShapeToXLAShape()
122 dimensions[d] = tensor_shape.dim_size(d); in TensorShapeToXLAShape()
137 Status TensorShapeToXLAShape(DataType dtype, const TensorShape& tensor_shape, in TensorShapeToXLAShape() argument
[all …]
Dshape_util.h34 TensorShape* tensor_shape);
39 Status TensorShapeToXLAShape(DataType dtype, const TensorShape& tensor_shape,
43 const TensorShape& tensor_shape);
48 const TensorShape& tensor_shape);
53 const PartialTensorShape& tensor_shape,
59 const PartialTensorShape& tensor_shape);
/external/ComputeLibrary/src/dynamic_fusion/sketch/gpu/components/cl/
DClComponentElementwiseBinary.cpp62 …nst TensorShape out_shape = TensorShape::broadcast_shape(lhs->tensor_shape(), rhs->tensor_shape()); in validate()
64 …ARM_COMPUTE_RETURN_ERROR_ON_MSG(detail::have_different_dimensions(out_shape, dst->tensor_shape(), … in validate()
66 const auto &lhs_shape = lhs->tensor_shape(); in validate()
67 const auto &rhs_shape = rhs->tensor_shape(); in validate()
68 const auto &dst_shape = dst->tensor_shape(); in validate()
98 ARM_COMPUTE_RETURN_ERROR_ON(lhs->tensor_shape().total_size() == 0); in validate()
99 ARM_COMPUTE_RETURN_ERROR_ON(rhs->tensor_shape().total_size() == 0); in validate()
100 ARM_COMPUTE_RETURN_ERROR_ON(dst->tensor_shape().total_size() == 0); in validate()
/external/ComputeLibrary/arm_compute/graph/backends/
DFunctionHelpers.h120 << " Shape: " << input->info()->tensor_shape() in create_activation_layer()
159 << " Shape: " << input->info()->tensor_shape() in create_arg_min_max_layer()
202 << " Shape: " << input->info()->tensor_shape() in create_batch_normalization_layer()
260 << " Input shape: " << input->info()->tensor_shape() in create_fused_convolution_batch_normalization_layer()
261 << " Weights shape: " << weights->info()->tensor_shape() in create_fused_convolution_batch_normalization_layer()
262 << " Output shape: " << output->info()->tensor_shape() in create_fused_convolution_batch_normalization_layer()
316 << " Input shape: " << input->info()->tensor_shape() in create_fused_depthwise_convolution_batch_normalization_layer()
317 << " Weights shape: " << weights->info()->tensor_shape() in create_fused_depthwise_convolution_batch_normalization_layer()
318 << " Output shape: " << output->info()->tensor_shape() in create_fused_depthwise_convolution_batch_normalization_layer()
354 << " Shape: " << input->info()->tensor_shape() in create_bounding_box_transform_layer()
[all …]
/external/tensorflow/tensorflow/core/example/testdata/
Dparse_example_graph_def.pbtxt15 tensor_shape {
36 tensor_shape {
61 tensor_shape {
82 tensor_shape {
106 tensor_shape {
127 tensor_shape {
151 tensor_shape {
173 tensor_shape {
194 tensor_shape {
215 tensor_shape {
[all …]
/external/tensorflow/tensorflow/lite/delegates/xnnpack/
Dquantization_util.cc35 const RuntimeShape &tensor_shape, int32_t zero_point, in DequantizeInt8() argument
40 optimized_ops::Dequantize(op_params, tensor_shape, packed_s8_data, in DequantizeInt8()
41 tensor_shape, unpacked_fp32_data); in DequantizeInt8()
46 const RuntimeShape& tensor_shape, in PerChannelDequantizeInt8() argument
53 reference_ops::PerChannelDequantize(op_params, tensor_shape, packed_s8_data, in PerChannelDequantizeInt8()
54 tensor_shape, unpacked_fp32_data); in PerChannelDequantizeInt8()
/external/armnn/delegate/python/test/
Dtest_external_delegate.py179 tensor_shape = [1, 2, 2, 1]
181 input0 = np.array([1, 2, 3, 4], dtype=np.float32).reshape(tensor_shape)
182 input1 = np.array([2, 2, 3, 4], dtype=np.float32).reshape(tensor_shape)
184 expected_output = np.array([1, 2, 2, 2], dtype=np.float32).reshape(tensor_shape)
204 tensor_shape = [1, 2, 2, 1]
206 input0 = np.array([1, 2, 3, 4], dtype=np.float32).reshape(tensor_shape)
207 input1 = np.array([2, 2, 3, 4], dtype=np.float32).reshape(tensor_shape)
209 expected_output = np.array([1, 2, 2, 2], dtype=np.float32).reshape(tensor_shape)
228 tensor_shape = [1, 2, 2, 1]
230 input0 = np.array([1, 2, 3, 4], dtype=np.uint8).reshape(tensor_shape)
[all …]
/external/tensorflow/tensorflow/python/keras/layers/
Dpooling.py19 from tensorflow.python.framework import tensor_shape
80 input_shape = tensor_shape.TensorShape(input_shape).as_list()
92 return tensor_shape.TensorShape([input_shape[0], features, length])
94 return tensor_shape.TensorShape([input_shape[0], length, features])
367 input_shape = tensor_shape.TensorShape(input_shape).as_list()
379 return tensor_shape.TensorShape(
382 return tensor_shape.TensorShape(
710 input_shape = tensor_shape.TensorShape(input_shape).as_list()
726 return tensor_shape.TensorShape(
729 return tensor_shape.TensorShape(
[all …]
/external/ComputeLibrary/tests/validation/CL/UNIT/
DMultithreaded.cpp57 const TensorShape tensor_shape(128u, 4u, 5u); in TEST_SUITE() local
64 s0[i] = create_tensor<CLTensor>(tensor_shape, DataType::F32, 1); in TEST_SUITE()
65 s1[i] = create_tensor<CLTensor>(tensor_shape, DataType::F32, 1); in TEST_SUITE()
66 st[i] = create_tensor<CLTensor>(tensor_shape, DataType::F32, 1); in TEST_SUITE()
67 dt[i] = create_tensor<CLTensor>(tensor_shape, DataType::F32, 1); in TEST_SUITE()
95 SimpleTensor<float> rs{ tensor_shape, DataType::F32, 1 }; in TEST_SUITE()
96 SimpleTensor<float> ra{ tensor_shape, DataType::F32, 1 }; in TEST_SUITE()
97 SimpleTensor<float> rb{ tensor_shape, DataType::F32, 1 }; in TEST_SUITE()
/external/tensorflow/tensorflow/python/tpu/
Dtpu_sharding.py18 from tensorflow.python.framework import tensor_shape
45 self._shard_dimension = tensor_shape.as_dimension(
140 self._shard_dimension = tensor_shape.as_dimension(shard_dimension)
172 shape = tensor_shape.as_shape(shape)
182 return tensor_shape.as_shape(dims)
216 shape = tensor_shape.as_shape(shape)
237 return tensor_shape.TensorShape(dims)
253 shape = tensor_shape.as_shape(shape)
266 return tensor_shape.TensorShape(dims)
/external/ComputeLibrary/src/gpu/cl/kernels/
DClReshapeKernel.cpp54 if(dst->tensor_shape().total_size() != 0) in validate_arguments()
58 … ARM_COMPUTE_RETURN_ERROR_ON(src->tensor_shape().total_size() != dst->tensor_shape().total_size()); in validate_arguments()
85 static_cast<cl_int>(src->tensor_shape()[0]), in configure()
86 static_cast<cl_int>(src->tensor_shape()[1]) in configure()
92 static_cast<cl_int>(dst->tensor_shape()[0]), in configure()
93 static_cast<cl_int>(dst->tensor_shape()[1]) in configure()
/external/tensorflow/tensorflow/core/ir/importexport/tests/roundtrip/
Dtest21.pbtxt15 tensor_shape {
63 tensor_shape {
110 tensor_shape {
157 tensor_shape {
204 tensor_shape {
251 tensor_shape {
298 tensor_shape {
345 tensor_shape {
393 tensor_shape {
440 tensor_shape {
[all …]
/external/ComputeLibrary/arm_compute/core/
DTensorInfo.h81 TensorInfo(const TensorShape &tensor_shape, Format format);
98 TensorInfo(const TensorShape &tensor_shape, size_t num_channels, DataType data_type);
107 …TensorInfo(const TensorShape &tensor_shape, size_t num_channels, DataType data_type, DataLayout da…
116 …TensorInfo(const TensorShape &tensor_shape, size_t num_channels, DataType data_type, QuantizationI…
131 void init(const TensorShape &tensor_shape, Format format);
140 …void init(const TensorShape &tensor_shape, Format format, const Strides &strides_in_bytes, size_t …
157 void init(const TensorShape &tensor_shape, size_t num_channels, DataType data_type);
168 …void init(const TensorShape &tensor_shape, size_t num_channels, DataType data_type, const Strides …
179 size_t init_auto_padding(const TensorShape &tensor_shape, Format format);
191 …size_t init_auto_padding(const TensorShape &tensor_shape, size_t num_channels, DataType data_type);
[all …]
/external/ComputeLibrary/src/core/NEON/kernels/
DNESelectKernel.cpp174 auto_init_if_empty(*output->info(), x->info()->tensor_shape(), 1, x->info()->data_type()); in configure()
181 …_has_same_rank = (c->info()->tensor_shape().num_dimensions() == x->info()->tensor_shape().num_dime… in configure()
196 …const bool is_same_rank = (c->tensor_shape().num_dimensions() == x->tensor_shape().num_dimensions(… in validate()
197 ARM_COMPUTE_RETURN_ERROR_ON(is_same_rank && (x->tensor_shape() != c->tensor_shape())); in validate()
198 …R_ON(!is_same_rank && ((c->tensor_shape().num_dimensions() > 1) || (c->tensor_shape().x() != x->te… in validate()

12345678910>>...39