/external/tensorflow/tensorflow/compiler/mlir/xla/tests/translate/ |
D | fully_connected_reference_model.hlotxt | 14 …// CHECK-NEXT: %[[VAL_2:.*]] = "mhlo.reshape"(%[[VAL_0]]) : (tensor<1x300xf32>) -> tensor<1x300xf3… 15 %reshape.3 = f32[1,300] reshape(%arg0.1) 18 %transpose.27 = f32[300,1] transpose(%reshape.3), dimensions={1,0} 20 …// CHECK-NEXT: %[[VAL_4:.*]] = "mhlo.reshape"(%[[VAL_3]]) : (tensor<300x1xf32>) -> tensor<300x1x1x… 21 %reshape.28 = f32[300,1,1] reshape(%transpose.27) 23 …// CHECK-NEXT: %[[VAL_5:.*]] = "mhlo.reshape"(%[[VAL_4]]) : (tensor<300x1x1xf32>) -> tensor<300x1x… 24 %reshape.29 = f32[300,1] reshape(%reshape.28) 27 %broadcast.30 = f32[300,1,5] broadcast(%reshape.29), dimensions={0,1} 62 …// CHECK-NEXT: %[[VAL_18:.*]] = "mhlo.reshape"(%[[VAL_17]]) : (tensor<1x300x3x1xf32>) -> tensor<1x… 63 %reshape.4 = f32[1,300,3,1] reshape(%copy.1) [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | reshape_op_test.py | 37 np_ans = x.reshape(y) 38 tf_ans = array_ops.reshape(x, y) 45 tf_ans = array_ops.reshape(x, y64) 52 y = array_ops.reshape(x, shape) 58 y = array_ops.reshape(x, shape64) 67 x = np.arange(1., 7.).reshape([1, 6]) > 3 71 x = np.arange(1., 7.).reshape([1, 6]).astype(np.float32) 75 x = np.arange(1., 7.).reshape([1, 6]).astype(np.float64) 79 x = np.arange(1., 7.).reshape([1, 6]).astype(np.int32) 83 x = np.arange(1., 7.).reshape([1, 6]).astype(np.complex64) [all …]
|
D | weights_broadcast_test.py | 33 return np.reshape(np.cumsum(np.ones(shape), dtype=np.int32), newshape=shape) 62 weights=np.asarray((5,)).reshape((1, 1, 1)), 68 weights=np.asarray((5, 7, 11, 3)).reshape((1, 1, 4)), 74 weights=np.asarray((5, 11)).reshape((1, 2, 1)), 80 weights=np.asarray((5, 7, 11, 3, 2, 13, 7, 5)).reshape((1, 2, 4)), 86 weights=np.asarray((5, 7, 11)).reshape((3, 1, 1)), 93 5, 7, 11, 3, 2, 12, 7, 5, 2, 17, 11, 3)).reshape((3, 1, 4)), 101 2, 17, 11, 3, 5, 7, 11, 3, 2, 12, 7, 5)).reshape((3, 2, 4)), 126 weights=np.asarray((5,)).reshape((1, 1)), 132 weights=np.asarray((5, 7, 11, 3, 2, 12)).reshape((3, 2)), [all …]
|
D | transpose_op_test.py | 149 vector = np.arange(0, 2).reshape((1, 1, 1, 2, 1)) 171 1, total_size + 1, dtype=datatype).reshape(input_shape) 194 1, total_size + 1, dtype=np.float32).reshape(input_shape) 231 1, total_size + 1, dtype=np.float32).reshape(input_shape) 256 1, total_size + 1, dtype=datatype).reshape(input_shape) 279 1, total_size + 1, dtype=np.float32).reshape(input_shape) 344 self._compareCpu(np.arange(0, 6).reshape([3, 2]).astype(np.float32), [0, 1]) 349 np.arange(0, 8).reshape([2, 4]).astype(np.float32), 355 x = np.arange(0, 8).reshape([2, 4]).astype(np.float32) 367 self._compare(np.arange(0, 21).reshape([3, 7]).astype(np.float16)) [all …]
|
D | extract_image_patches_op_test.py | 58 image = np.reshape(range(120), [2, 3, 4, 5]) 60 patches = np.reshape(range(120), [2, 3, 4, 5]) 73 image = np.reshape(range(120), [2, 4, 5, 3]) 116 image = np.arange(16).reshape(1, 4, 4, 1).astype(np.float32) 132 np.reshape(range(120), [2, 3, 4, 5]).astype(dtype) + 133 np.reshape(range(120, 240), [2, 3, 4, 5]).astype(dtype) * 1j) 135 np.reshape(range(120), [2, 3, 4, 5]).astype(dtype) + 136 np.reshape(range(120, 240), [2, 3, 4, 5]).astype(dtype) * 1j)
|
D | scan_ops_test.py | 102 x = np.arange(1, 6).reshape([5]).astype(dtype) 112 x = np.arange(1, 6).reshape([5]).astype(dtype) 120 x = np.arange(1, 6).reshape([5]).astype(dtype) 127 x = np.arange(0, 10).reshape([2, 5]).astype(dtype) 134 x = np.arange(0, 20).reshape([2, 2, 5]).astype(dtype) 141 x = np.arange(1, 145).reshape([2, 2, 3, 3, 2, 2]).astype(dtype) 153 x = np.arange(0, 10).reshape([2, 5]).astype(np.float32) 170 x = np.arange(0, 50).reshape(shape).astype(np.float64) 235 x = np.arange(1, 6).reshape([5]).astype(dtype) 245 x = np.arange(1, 6).reshape([5]).astype(dtype) [all …]
|
D | extract_volume_patches_op_test.py | 59 image = np.arange(2 * 3 * 4 * 5 * 6).reshape([2, 3, 4, 5, 6]) + 1 71 image = np.arange(6 * 2 * 4 * 5 * 3).reshape([6, 2, 4, 5, 3]) + 1 83 image = np.arange(45).reshape([1, 3, 3, 5, 1]) + 1 102 image = np.arange(8).reshape([1, 2, 2, 2, 1]) + 1 113 image = np.arange(8).reshape([1, 2, 2, 2, 1]) + 1
|
/external/tensorflow/tensorflow/python/training/ |
D | checkpoint_ops_test.py | 49 np.reshape(np.linspace(0.0, 79, 5 * 16), (5, 16))) 113 np.reshape([18, 34, 50, self.init_val, self.init_val], [5, 1]), 114 np.reshape([16, 32, 48, self.init_val, self.init_val], [5, 1]), 115 np.reshape([self.init_val] * 5, [5, 1]), 116 np.reshape([17, 33, 49, self.init_val, self.init_val], [5, 1]), 117 np.reshape([self.init_val] * 5, [5, 1]) 145 np.reshape([2, 18, 34, 50, self.init_val, self.init_val], [6, 1]), 146 np.reshape([0, 16, 32, 48, self.init_val, self.init_val], [6, 1]), 147 np.reshape([self.init_val] * 6, [6, 1]), 148 np.reshape([1, 17, 33, 49, self.init_val, self.init_val], [6, 1]), [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
D | space_to_batch_converter_test.cc | 56 auto reshape = root->operand(0)->operand(0); in TEST_F() local 57 EXPECT_THAT(reshape, op::Reshape()); in TEST_F() 58 EXPECT_THAT(reshape->operand(0)->operand(1), op::Convolution()); in TEST_F() 59 const int64 batch_dim = reshape->operand(0) in TEST_F() 64 EXPECT_GT(reshape->operand(0)->shape().dimensions(batch_dim), 1); in TEST_F() 105 auto reshape = root->operand(0)->operand(0); in TEST_F() local 106 EXPECT_THAT(reshape, op::Reshape()); in TEST_F() 107 EXPECT_THAT(reshape->operand(0)->operand(1), op::Convolution()); in TEST_F() 108 const int64 batch_dim = reshape->operand(0) in TEST_F() 113 EXPECT_GT(reshape->operand(0)->shape().dimensions(batch_dim), 4); in TEST_F() [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | batch_norm_op.h | 52 output.reshape(rest_by_depth).device(d) = in operator() 53 (input.reshape(rest_by_depth) - in operator() 54 mean.reshape(one_by_depth).broadcast(rest_by_one)) * in operator() 57 .reshape(one_by_depth) in operator() 59 beta.reshape(one_by_depth).broadcast(rest_by_one); in operator() 61 output.reshape(rest_by_depth).device(d) = in operator() 62 (input.reshape(rest_by_depth) - in operator() 63 mean.reshape(one_by_depth).broadcast(rest_by_one)) * in operator() 66 .reshape(one_by_depth) in operator() 68 beta.reshape(one_by_depth).broadcast(rest_by_one); in operator() [all …]
|
D | training_ops_gpu.cu.cc | 344 var.device(d) -= lr.reshape(single).broadcast(bcast) * grad; in operator ()() 474 var.device(d) -= lr.reshape(single).broadcast(bcast) * grad * accum.rsqrt(); in operator ()() 497 grad / (accum.sqrt() + epsilon.reshape(single).broadcast(bcast)); in operator ()() 498 var.device(d) -= lr.reshape(single).broadcast(bcast) * update; in operator ()() 547 auto lr_bcast = lr.reshape(single).broadcast(bcast); in operator ()() 548 auto l1_bcast = l1.reshape(single).broadcast(bcast); in operator ()() 549 auto l2_bcast = l2.reshape(single).broadcast(bcast); in operator ()() 605 accum.device(d) = accum * rho.reshape(single).broadcast(bcast) + in operator ()() 607 rho.reshape(single).broadcast(bcast)); in operator ()() 609 (accum_update + epsilon.reshape(single).broadcast(bcast)).sqrt() * in operator ()() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/ |
D | reshape.mlir | 7 %0 = "mhlo.reshape"(%cst) : (tensor<1x1xi32>) -> tensor<i32> 18 %0 = "mhlo.reshape"(%cst) : (tensor<1x2xi32>) -> tensor<2xi32> 29 %0 = "mhlo.reshape"(%cst) : (tensor<i32>) -> tensor<1xi32> 40 %0 = "mhlo.reshape"(%cst) : (tensor<4x4xi64>) -> tensor<16xi64> 51 %0 = "mhlo.reshape"(%cst) : (tensor<4x4xi64>) -> tensor<16xi64> 62 %0 = "mhlo.reshape"(%cst) : (tensor<3x2xi32>) -> tensor<6xi32> 75 %0 = "mhlo.reshape"(%cst) : (tensor<6xi32>) -> tensor<2x3xi32> 86 %0 = "mhlo.reshape"(%cst) : (tensor<4x4xf64>) -> tensor<16xf64> 97 %0 = "mhlo.reshape"(%arg) : (tensor<2x3xi32>) -> tensor<2x3xi32> 106 // CHECK-NEXT: "mhlo.reshape"([[ARG]]) : (tensor<2x3xi32>) -> tensor<3x2xi32> [all …]
|
/external/tensorflow/tensorflow/python/compiler/tensorrt/test/ |
D | biasadd_matmul_test.py | 51 x2 = gen_array_ops.reshape(x2, [4, -1]) 60 x4 = gen_array_ops.reshape(x4, [4, -1]) 71 x6 = gen_array_ops.reshape(x, [4, 24, 6]) 74 x6 = gen_array_ops.reshape(x6, [4, -1]) 76 x7 = gen_array_ops.reshape(x, [4, 12, 4, 3]) 79 x7 = gen_array_ops.reshape(x7, [4, -1]) 81 x8 = gen_array_ops.reshape(x, [4, 4, 3, 2, 6]) 84 x8 = gen_array_ops.reshape(x8, [4, -1]) 86 x9 = gen_array_ops.reshape(x, [4, 12, 3, 2, 2]) 89 x9 = gen_array_ops.reshape(x9, [4, -1]) [all …]
|
D | reshape_transpose_test.py | 40 incompatible_reshape = array_ops.reshape(inp, shape) 41 reshape_back = array_ops.reshape(incompatible_reshape, [-1, 24, 24, 2]) 45 compatible_reshape = array_ops.reshape( 47 compatible_reshape = array_ops.reshape( 49 compatible_reshape = array_ops.reshape( 51 compatible_reshape = array_ops.reshape( 53 compatible_reshape = array_ops.reshape( 55 compatible_reshape = array_ops.reshape( 57 compatible_reshape = array_ops.reshape(
|
D | annotate_max_batch_sizes_test.py | 103 tensor = array_ops.reshape(tensor, [-1] + self.tensor_shapes[1][1:]) 109 tensor = array_ops.reshape(tensor, [-1] + self.tensor_shapes[2][1:]) 115 tensor = array_ops.reshape(tensor, [-1] + self.tensor_shapes[3][1:]) 129 tensor = array_ops.reshape(tensor, self.tensor_shapes[1]) 131 tensor = array_ops.reshape(tensor, self.tensor_shapes[2]) 133 tensor = array_ops.reshape(tensor, self.tensor_shapes[3])
|
/external/tensorflow/tensorflow/compiler/xla/service/spmd/ |
D | canonicalize_all_gather_for_cse_test.cc | 66 const HloInstruction* const reshape = in TEST_F() local 68 EXPECT_THAT(reshape, in TEST_F() 86 const HloInstruction* const reshape = in TEST_F() local 88 EXPECT_THAT(reshape, in TEST_F() 106 const HloInstruction* const reshape = in TEST_F() local 108 EXPECT_THAT(reshape, in TEST_F() 126 const HloInstruction* const reshape = in TEST_F() local 128 EXPECT_THAT(reshape, AllOf(op::AllGather(op::Reshape(op::Reshape(_))), in TEST_F() 146 const HloInstruction* const reshape = in TEST_F() local 148 EXPECT_THAT(reshape, AllOf(op::AllGather(op::Reshape(op::Reshape(_))), in TEST_F() [all …]
|
/external/llvm-project/mlir/test/Dialect/Tosa/ |
D | broadcast.mlir | 6 // CHECK-NOT: reshape 14 // CHECK: reshape 22 // CHECK: reshape 30 // CHECK: reshape 38 // CHECK: reshape 46 // CHECK: reshape 54 // CHECK: reshape 62 // CHECK: reshape 70 // CHECK: reshape 78 // CHECK: reshape [all …]
|
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/ |
D | image_preprocessing_test.py | 96 input_image = np.reshape(np.arange(0, 16), (1, 4, 4, 1)).astype(dtype) 106 expected_output = np.reshape(expected_output, (1, 2, 2, 1)) 112 input_image = np.reshape(np.arange(0, 4), (1, 2, 2, 1)).astype(dtype) 124 expected_output = np.reshape(expected_output, (1, 4, 4, 1)) 355 mock_random = np.reshape(mock_random, [2, 1, 1, 1]) 382 mock_random = np.reshape(mock_random, [2, 1, 1, 1]) 392 mock_random = np.reshape(mock_random, [2, 1, 1, 1]) 412 mock_random = np.reshape(mock_random, [2, 1, 1, 1]) 533 input_image = np.reshape(np.arange(0, 25), (1, 5, 5, 1)).astype(dtype) 547 expected_output = np.reshape(expected_output, (1, 5, 5, 1)) [all …]
|
/external/tensorflow/tensorflow/core/api_def/base_api/ |
D | api_def_Reshape.pbtxt | 30 reshape(t, [3, 3]) ==> [[1, 2, 3], 37 reshape(t, [2, 4]) ==> [[1, 1, 2, 2], 48 reshape(t, [-1]) ==> [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6] 53 reshape(t, [2, -1]) ==> [[1, 1, 1, 2, 2, 2, 3, 3, 3], 56 reshape(t, [-1, 9]) ==> [[1, 1, 1, 2, 2, 2, 3, 3, 3], 59 reshape(t, [ 2, -1, 3]) ==> [[[1, 1, 1], 68 reshape(t, []) ==> 7
|
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/ |
D | canonicalize.mlir | 3 // Checks that tfl.reshape shape operand is converted to a vector if it is possible 7 // expected-error @+1 {{'tfl.reshape' op requires 'shape' to be rank 1, but got 2}} 8 %1 = "tfl.reshape"(%arg0, %shape0) : (tensor<4x4x4xf32>, tensor<1x2xi32>) -> tensor<16x4xf32> 14 // Checks that tfl.reshape should be removed if its output's only user is 15 // another tfl.reshape 20 %0 = "tfl.reshape"(%arg0, %shape0) : (tensor<4x4x4xf32>, tensor<2xi32>) -> tensor<16x4xf32> 21 %1 = "tfl.reshape"(%0, %shape1) : (tensor<16x4xf32>, tensor<1xi32>) -> tensor<64xf32> 26 // CHECK: %[[RESHAPE:.*]] = "tfl.reshape"(%arg0, %[[CST]]) : (tensor<4x4x4xf32>, tensor<1xi32>) ->… 30 // Checks that tfl.reshape should be removed if its output has more than one 31 // user but all users are tfl.reshape [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/tfr/integration/ |
D | graph_decompose_test.py | 46 self.assertAllEqual(sq1.numpy().reshape(-1), [1, 2, 3, 4]) 47 self.assertAllEqual(sq2.numpy().reshape(-1), [2, 4, 6, 8]) 48 self.assertAllEqual(sq3.numpy().reshape(-1), [3, 6, 9, 12]) 56 self.assertAllEqual(sq.numpy().reshape(-1), [-3, 0, 5, 12]) 64 self.assertAllEqual(sq.numpy().reshape(-1), [0, 0, 5, 12]) 77 self.assertAllClose(sq.numpy().reshape(-1), [-0.950213, 0, 5, 12])
|
D | node_expansion_test.py | 46 self.assertAllEqual(sq1.numpy().reshape(-1), [1, 2, 3, 4]) 47 self.assertAllEqual(sq2.numpy().reshape(-1), [2, 4, 6, 8]) 48 self.assertAllEqual(sq3.numpy().reshape(-1), [3, 6, 9, 12]) 55 self.assertAllEqual(sq.numpy().reshape(-1), [-3, 0, 5, 12]) 62 self.assertAllEqual(sq.numpy().reshape(-1), [0, 0, 5, 12]) 74 self.assertAllClose(sq.numpy().reshape(-1), [-0.950213, 0, 5, 12])
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | scan_ops_test.py | 102 x = np.arange(1, 6).reshape([5]).astype(dtype) 111 x = np.arange(1, 6).reshape([5]).astype(dtype) 117 x = np.arange(0, 10).reshape([2, 5]).astype(dtype) 123 x = np.arange(0, 20).reshape([2, 2, 5]).astype(dtype) 129 x = np.arange(1, 145).reshape([2, 2, 3, 3, 2, 2]).astype(dtype) 135 x = np.arange(0, 10).reshape([2, 5]).astype(np.float32) 181 x = np.arange(1, 6).reshape([5]).astype(dtype) 190 x = np.arange(1, 6).reshape([5]).astype(dtype) 196 x = np.arange(1, 11).reshape([2, 5]).astype(dtype) 202 x = np.arange(1, 21).reshape([2, 2, 5]).astype(dtype) [all …]
|
D | function_test.py | 39 aval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32) 40 bval = np.array([5, 6, 7, 8]).reshape([2, 2]).astype(np.float32) 65 aval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32) 66 bval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32) 89 aval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32) 90 bval = np.array([5, 6, 7, 8]).reshape([2, 2]).astype(np.float32) 139 aval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32) 140 bval = np.array([4, 3, 2, 1]).reshape([2, 2]).astype(np.float32)
|
/external/llvm-project/mlir/test/Dialect/Linalg/ |
D | canonicalize.mlir | 63 %0 = linalg.reshape %arg0 [affine_map<(d0, d1, d2) -> (d0, d1, d2)>] : 65 %1 = linalg.reshape %0 [] : memref<1xf32> into memref<f32> 69 // CHECK: linalg.reshape %{{.*}} [] 97 %0 = linalg.reshape %arg0 102 %1 = linalg.reshape %0 111 // CHECK: linalg.reshape %{{.*}} [#[[$MAP0]], #[[$MAP1]]] 112 // CHECK-NOT: linalg.reshape 118 %0 = linalg.reshape %arg0 122 %1 = linalg.reshape %0 132 // CHECK: linalg.reshape %{{.*}} [#[[$MAP0]], #[[$MAP1]]] [all …]
|