/external/tensorflow/tensorflow/lite/kernels/internal/ |
D | resize_nearest_neighbor_test.cc | 32 const RuntimeShape& output_shape, in TestReferenceResizeNearestNeighbor() argument 40 output_size_data.data(), output_shape, output_data.data()); in TestReferenceResizeNearestNeighbor() 51 RuntimeShape output_shape = {1, 1, 1, 1}; in TEST() local 55 output_shape, output_data); in TEST() 62 RuntimeShape output_shape = {1, 3, 3, 1}; in TEST() local 66 output_shape, output_data); in TEST() 73 RuntimeShape output_shape = {1, 2, 2, 1}; in TEST() local 77 output_shape, output_data); in TEST() 84 RuntimeShape output_shape = {1, 2, 5, 1}; in TEST() local 88 output_shape, output_data); in TEST() [all …]
|
D | depthwiseconv_quantized_test.cc | 110 const RuntimeShape& output_shape, uint8* output_data) { in DispatchDepthwiseConv() argument 130 pad_height, depth_multiplier, output_shape, output_shift); in DispatchDepthwiseConv() 136 << " output_width = " << output_shape.Dims(2) in DispatchDepthwiseConv() 137 << " output_height = " << output_shape.Dims(1); in DispatchDepthwiseConv() 142 bias_shape, bias_data, output_shape, output_data); in DispatchDepthwiseConv() 166 bias_shape, bias_data, output_shape, output_data); in DispatchDepthwiseConv() 191 << " output_width = " << output_shape.Dims(2) in DispatchDepthwiseConv() 192 << " output_height = " << output_shape.Dims(1) in DispatchDepthwiseConv() 200 bias_shape, bias_data, output_shape, output_data); in DispatchDepthwiseConv() 217 bias_shape, bias_data, output_shape, output_data); in DispatchDepthwiseConv() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/ |
D | reference_ops.h | 136 const float* bias_data, const RuntimeShape& output_shape, in Conv() argument 149 TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); in Conv() 153 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in Conv() 155 const int output_depth = MatchingDim(filter_shape, 0, output_shape, 3); in Conv() 163 const int output_height = output_shape.Dims(1); in Conv() 164 const int output_width = output_shape.Dims(2); in Conv() 196 output_data[Offset(output_shape, batch, out_y, out_x, out_channel)] = in Conv() 209 const int32* bias_data, const RuntimeShape& output_shape, in Conv() argument 232 TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); in Conv() 233 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in Conv() [all …]
|
D | fully_connected.h | 33 const float* bias_data, const RuntimeShape& output_shape, in FullyConnected() argument 42 const int output_dims_count = output_shape.DimensionsCount(); in FullyConnected() 44 const int batches = FlatSizeSkipDim(output_shape, output_dims_count - 1); in FullyConnected() 46 output_shape, output_dims_count - 1); in FullyConnected() 69 const int32* bias_data, const RuntimeShape& output_shape, in FullyConnected() argument 80 TFLITE_DCHECK_GE(output_shape.DimensionsCount(), 1); in FullyConnected() 88 const int output_dim_count = output_shape.DimensionsCount(); in FullyConnected() 90 const int batches = FlatSizeSkipDim(output_shape, output_dim_count - 1); in FullyConnected() 92 output_shape, output_dim_count - 1); in FullyConnected() 118 const int32* bias_data, const RuntimeShape& output_shape, in FullyConnected() argument [all …]
|
/external/tensorflow/tensorflow/lite/kernels/ |
D | sparse_to_dense.cc | 44 TfLiteStatus Resize(TfLiteContext* context, const TfLiteTensor* output_shape, in Resize() argument 46 const int output_dimensions = NumElements(output_shape); in Resize() 49 output_shape_array->data[i] = GetTensorData<T>(output_shape)[i]; in Resize() 57 const TfLiteTensor* output_shape, in CheckDimensionsMatch() argument 65 TF_LITE_ENSURE_EQ(context, NumElements(output_shape), 1); in CheckDimensionsMatch() 70 NumElements(output_shape)); in CheckDimensionsMatch() 133 const TfLiteTensor* output_shape, in ResizeOutputShape() argument 135 if (output_shape->type == kTfLiteInt32) { in ResizeOutputShape() 136 return Resize<int32_t>(context, output_shape, output); in ResizeOutputShape() 137 } else if (output_shape->type == kTfLiteInt64) { in ResizeOutputShape() [all …]
|
D | reshape.cc | 32 TfLiteIntArray* output_shape) { in ResizeOutput() argument 44 for (int i = 0; i < output_shape->size; ++i) { in ResizeOutput() 45 int value = output_shape->data[i]; in ResizeOutput() 54 output_shape->data[stretch_dim] = num_input_elements / num_output_elements; in ResizeOutput() 55 num_output_elements *= output_shape->data[stretch_dim]; in ResizeOutput() 59 return context->ResizeTensor(context, output, output_shape); in ResizeOutput() 66 TfLiteIntArray* output_shape = TfLiteIntArrayCreate(shape->dims->data[0]); in GetOutputShapeFromTensor() local 67 for (int i = 0; i < output_shape->size; ++i) { in GetOutputShapeFromTensor() 68 output_shape->data[i] = shape->data.i32[i]; in GetOutputShapeFromTensor() 71 return output_shape; in GetOutputShapeFromTensor() [all …]
|
D | transpose_conv.cc | 107 const TfLiteTensor* output_shape, in ResizeIm2ColTensor() argument 111 if (output_shape->type != kTfLiteInt32) { in ResizeIm2ColTensor() 113 output_shape->type); in ResizeIm2ColTensor() 116 TF_LITE_ENSURE_EQ(context, NumElements(output_shape), 4); in ResizeIm2ColTensor() 118 im2col_shape_array->data[0] = output_shape->data.i32[0]; in ResizeIm2ColTensor() 119 im2col_shape_array->data[1] = output_shape->data.i32[1]; in ResizeIm2ColTensor() 120 im2col_shape_array->data[2] = output_shape->data.i32[2]; in ResizeIm2ColTensor() 140 const TfLiteTensor* output_shape = in Prepare() local 150 TF_LITE_ENSURE_EQ(context, NumDimensions(output_shape), 1); in Prepare() 161 if (!IsConstantTensor(output_shape)) { in Prepare() [all …]
|
D | audio_spectrogram_test.cc | 75 std::vector<int> output_shape = m.GetOutputShape(); in TEST() local 76 EXPECT_EQ(3, output_shape.size()); in TEST() 77 EXPECT_THAT(output_shape, ElementsAre(1, 1, 5)); in TEST() 91 std::vector<int> output_shape = m.GetOutputShape(); in TEST() local 92 EXPECT_EQ(3, output_shape.size()); in TEST() 93 EXPECT_THAT(output_shape, ElementsAre(1, 1, 5)); in TEST() 107 std::vector<int> output_shape = m.GetOutputShape(); in TEST() local 108 EXPECT_THAT(output_shape, ElementsAre(1, 2, 5)); in TEST()
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/bijectors/ |
D | ordered.py | 83 def _inverse_event_shape(self, output_shape): argument 84 if output_shape.ndims is None or output_shape[-1] is None: 85 return output_shape 86 if output_shape[-1] <= 1: 87 raise ValueError("output_shape[-1] = %d <= 1" % output_shape[-1]) 88 return tensor_shape.TensorShape([output_shape[-1]]) 90 def _inverse_event_shape_tensor(self, output_shape): argument 93 output_shape[-1], 1, message="Need last dimension greater than 1.") 94 output_shape = control_flow_ops.with_dependencies( 95 [is_greater_one], output_shape) [all …]
|
D | softmax_centered.py | 90 def _inverse_event_shape(self, output_shape): argument 91 if output_shape.ndims is None or output_shape[-1] is None: 92 return output_shape 93 if output_shape[-1] <= 1: 94 raise ValueError("output_shape[-1] = %d <= 1" % output_shape[-1]) 95 return tensor_shape.TensorShape([output_shape[-1] - 1]) 97 def _inverse_event_shape_tensor(self, output_shape): argument 101 output_shape[-1], 1, message="Need last dimension greater than 1.") 102 output_shape = control_flow_ops.with_dependencies( 103 [is_greater_one], output_shape) [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | broadcast_to_op.cc | 46 TensorShape output_shape; in Compute() local 48 ctx->op_kernel().MakeShape(shape_tensor, &output_shape)); in Compute() 51 if (output_shape == input_shape) { in Compute() 56 OP_REQUIRES(ctx, input_shape.dims() <= output_shape.dims(), in Compute() 60 output_shape.dims(), ").")); in Compute() 63 OP_REQUIRES_OK(ctx, ctx->allocate_output(0, output_shape, &output_tensor)); in Compute() 65 if (output_shape.num_elements() == 0) { in Compute() 77 BCast bcast(BCast::FromShape(input_shape), BCast::FromShape(output_shape), in Compute() 82 output_shape.DebugString())); in Compute() 84 functor::BroadcastTo<Device, T>()(device, ctx, *output_tensor, output_shape, in Compute() [all …]
|
D | deserialize_sparse_variant_op.cc | 61 const Tensor* output_shape; in Compute() local 66 &output_shape, &total_non_zeros)); in Compute() 69 output_shape->NumElements(), &output_indices, in Compute() 73 context->set_output(2, *output_shape); in Compute() 91 Tensor* output_shape; in Compute() local 109 &output_shape)); in Compute() 111 auto output_shape_vec = output_shape->vec<int64>(); in Compute() 136 output_shape->NumElements() - input_dims_to_stack == in Compute() 141 i, "] was: ", output_shape->NumElements() - input_dims_to_stack, in Compute() 155 const int output_rank = output_shape->NumElements(); in Compute() [all …]
|
D | rpc_op.cc | 76 TensorShape output_shape({}); in ComputeAsync() local 81 output_shape.dims() == 0 || in ComputeAsync() 82 output_shape.dim_size(0) == t.dim_size(0), in ComputeAsync() 84 "Input vector shapes don't match: ", output_shape.DebugString(), in ComputeAsync() 87 output_shape = t.shape(); in ComputeAsync() 93 ctx, ctx->allocate_output(0, output_shape, &response_t), done); in ComputeAsync() 101 ctx, ctx->allocate_output(1, output_shape, &status_code_t), done); in ComputeAsync() 103 ctx, ctx->allocate_output(2, output_shape, &status_message_t), done); in ComputeAsync() 112 int64 num_elements = output_shape.num_elements(); in ComputeAsync()
|
D | reshape_util.cc | 58 TensorShape output_shape; in Reshape() local 71 output_shape.AddDim(1); in Reshape() 77 output_shape.AddDim(size); in Reshape() 93 output_shape.set_dim(unknown_index, missing); in Reshape() 97 context, output_shape.num_elements() == dense_size, in Reshape() 100 output_shape.num_elements())); in Reshape() 103 if (input_shape == output_shape) { in Reshape() 121 output_strides[d] = output_strides[d + 1] * output_shape.dim_size(d + 1); in Reshape() 148 for (int j = 0; j < output_shape.dims(); ++j) { in Reshape() 149 output_shape_vec(j) = output_shape.dim_size(j); in Reshape()
|
/external/tensorflow/tensorflow/python/ops/ |
D | split_benchmark.py | 58 def _run_graph(self, device, output_shape, variable, num_outputs, axis): argument 75 input_shape = [output_shape[0] * num_outputs, output_shape[1]] 76 sizes = [output_shape[0] for _ in range(num_outputs)] 78 input_shape = [output_shape[0], output_shape[1] * num_outputs] 79 sizes = [output_shape[1] for _ in range(num_outputs)] 82 low=max(1, output_shape[axis] - 2), 83 high=output_shape[axis] + 2, 87 input_shape = [total_size, output_shape[1]] 89 input_shape = [output_shape[0], total_size]
|
/external/tensorflow/tensorflow/lite/kernels/internal/reference/integer_ops/ |
D | pooling.h | 26 const RuntimeShape& output_shape, int8* output_data) { in AveragePool() argument 30 TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); in AveragePool() 31 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in AveragePool() 32 const int depth = MatchingDim(input_shape, 3, output_shape, 3); in AveragePool() 35 const int output_height = output_shape.Dims(1); in AveragePool() 36 const int output_width = output_shape.Dims(2); in AveragePool() 73 output_data[Offset(output_shape, batch, out_y, out_x, channel)] = in AveragePool() 82 const int8* input_data, const RuntimeShape& output_shape, in MaxPool() argument 91 TFLITE_DCHECK_EQ(output_shape.DimensionsCount(), 4); in MaxPool() 92 const int batches = MatchingDim(input_shape, 0, output_shape, 0); in MaxPool() [all …]
|
/external/tensorflow/tensorflow/core/grappler/utils/ |
D | symbolic_shapes_test.cc | 78 TensorShapeProto output_shape; in TEST_F() local 80 ShapeAfterBroadcast(MakeShape({1, 2}), MakeShape({1, 2}), &output_shape)); in TEST_F() 81 EXPECT_TRUE(ShapesSymbolicallyEqual(MakeShape({1, 2}), output_shape)); in TEST_F() 83 &output_shape)); in TEST_F() 84 EXPECT_TRUE(ShapesSymbolicallyEqual(MakeShape({-2, 2}), output_shape)); in TEST_F() 86 &output_shape)); in TEST_F() 87 EXPECT_TRUE(ShapesSymbolicallyEqual(MakeShape({-2, 32}), output_shape)); in TEST_F() 89 &output_shape)); in TEST_F() 90 EXPECT_TRUE(ShapesSymbolicallyEqual(MakeShape({-2, -2}), output_shape)); in TEST_F() 92 &output_shape)); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/python/keras/layers/ |
D | merge.py | 70 output_shape = list(shape1[:-len(shape2)]) 73 output_shape.append(None) 75 output_shape.append(j) 77 output_shape.append(i) 83 output_shape.append(i) 84 return tuple(output_shape) 103 output_shape = None 105 output_shape = input_shape[0][1:] 111 output_shape = self._compute_elemwise_op_output_shape(output_shape, shape) 187 output_shape = None [all …]
|
D | core.py | 410 def _fix_unknown_dimension(self, input_shape, output_shape): argument 430 output_shape = list(output_shape) 434 for index, dim in enumerate(output_shape): 447 output_shape[unknown] = original // known 450 return output_shape 455 output_shape = [input_shape[0]] 457 output_shape += tuple(s if s != -1 else None for s in self.target_shape) 459 output_shape = [input_shape[0]] 460 output_shape += self._fix_unknown_dimension(input_shape[1:], 462 return tensor_shape.TensorShape(output_shape) [all …]
|
/external/tensorflow/tensorflow/python/ops/parallel_for/ |
D | gradients.py | 48 output_shape = array_ops.shape(output) 73 [output_shape, array_ops.shape(out)[1:]], axis=0) 107 output_shape = output.shape 108 if not output_shape[0].is_compatible_with(inp.shape[0]): 111 if output_shape.is_fully_defined(): 112 batch_size = int(output_shape[0]) 113 output_row_size = output_shape.num_elements() // batch_size 115 output_shape = array_ops.shape(output) 116 batch_size = output_shape[0] 141 new_shape = array_ops.concat([output_shape, inp_shape[1:]], axis=0)
|
/external/tensorflow/tensorflow/python/framework/ |
D | common_shapes.py | 229 output_shape = [batch_size, out_rows, out_cols, depth_out] 232 output_shape = [output_shape[0], output_shape[3], output_shape[1], 233 output_shape[2]] 234 return [tensor_shape.TensorShape(output_shape)] 416 output_shape = [batch_size, out_rows, out_cols, depth] 419 output_shape = [output_shape[0], output_shape[3], output_shape[1], 420 output_shape[2]] 421 return [tensor_shape.TensorShape(output_shape)] 487 output_shape = [batch_size, out_rows, out_cols, depth] 495 output_shape = [batch_size, in_rows, in_cols, depth // ksize_d] [all …]
|
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/ |
D | optimized_ops.h | 299 int accum_shift, const RuntimeShape& output_shape, in GEMVForLstmCell() argument 304 TFLITE_DCHECK_GE(output_shape.DimensionsCount(), 1); in GEMVForLstmCell() 305 const int output_dim_count = output_shape.DimensionsCount(); in GEMVForLstmCell() 307 TFLITE_DCHECK_EQ(FlatSizeSkipDim(output_shape, output_dim_count - 1), 1); in GEMVForLstmCell() 310 output_shape, output_dim_count - 1); in GEMVForLstmCell() 486 int32 accum_multiplier, int accum_shift, const RuntimeShape& output_shape, in GEMVForLstmCellWithSymmetricRange() argument 491 TFLITE_DCHECK_GE(output_shape.DimensionsCount(), 1); in GEMVForLstmCellWithSymmetricRange() 492 const int output_dim_count = output_shape.DimensionsCount(); in GEMVForLstmCellWithSymmetricRange() 494 TFLITE_DCHECK_EQ(FlatSizeSkipDim(output_shape, output_dim_count - 1), 1); in GEMVForLstmCellWithSymmetricRange() 497 output_shape, output_dim_count - 1); in GEMVForLstmCellWithSymmetricRange() [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | broadcast_to_ops_test.py | 63 output_shape = [2] * output_dim 65 v_tf = array_ops.broadcast_to(constant_op.constant(x), output_shape) 66 v_np = np.broadcast_to(x, output_shape) 72 output_shape = [2, 5, 3] 75 v_tf = array_ops.broadcast_to(constant_op.constant(x), output_shape) 76 v_np = np.broadcast_to(x, output_shape) 82 output_shape = [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 15, 3, 2, 2, 2] 85 v_tf = array_ops.broadcast_to(constant_op.constant(x), output_shape) 86 v_np = np.broadcast_to(x, output_shape) 92 output_shape = [1, 1, 1, 2, 5, 3, 2, 2, 2, 3, 3, 3] [all …]
|
D | concat_op_test.py | 195 output_shape = [10, 9, 2] 196 grad_inp = np.random.rand(*output_shape).astype(dtype.as_numpy_dtype) 200 grad_inp.flatten(), shape=output_shape) 226 output_shape = [9, 10, 2] 227 grad_inp = np.random.rand(*output_shape).astype("f") 229 grad_inp.flatten(), shape=output_shape) 254 output_shape = [10, 2, 9] 255 grad_inp = np.random.rand(*output_shape).astype("f") 257 grad_inp.flatten(), shape=output_shape) 284 output_shape = input_shape [all …]
|
/external/tensorflow/tensorflow/contrib/lite/kernels/internal/optimized/ |
D | optimized_ops.h | 421 int accum_shift, const RuntimeShape& output_shape, in GEMVForLstmCell() argument 426 TFLITE_DCHECK_GE(output_shape.DimensionsCount(), 1); in GEMVForLstmCell() 427 const int output_dim_count = output_shape.DimensionsCount(); in GEMVForLstmCell() 429 TFLITE_DCHECK_EQ(FlatSizeSkipDim(output_shape, output_dim_count - 1), 1); in GEMVForLstmCell() 432 output_shape, output_dim_count - 1); in GEMVForLstmCell() 608 int32 accum_multiplier, int accum_shift, const RuntimeShape& output_shape, in GEMVForLstmCellWithSymmetricRange() argument 613 TFLITE_DCHECK_GE(output_shape.DimensionsCount(), 1); in GEMVForLstmCellWithSymmetricRange() 614 const int output_dim_count = output_shape.DimensionsCount(); in GEMVForLstmCellWithSymmetricRange() 616 TFLITE_DCHECK_EQ(FlatSizeSkipDim(output_shape, output_dim_count - 1), 1); in GEMVForLstmCellWithSymmetricRange() 619 output_shape, output_dim_count - 1); in GEMVForLstmCellWithSymmetricRange() [all …]
|