Home
last modified time | relevance | path

Searched refs:in_shape (Results 1 – 25 of 31) sorted by relevance

12

/external/tensorflow/tensorflow/python/ops/
Dimage_grad_test_base.py44 in_shape = [1, 2, 2, 1]
48 x = np.arange(0, 4).reshape(in_shape).astype(nptype)
50 input_tensor = constant_op.constant(x, shape=in_shape)
59 in_shape = [1, 2, 3, 1]
63 x = np.arange(0, 6).reshape(in_shape).astype(nptype)
69 input_tensor = constant_op.constant(x, shape=in_shape)
76 in_shape = [1, 4, 6, 1]
80 x = np.arange(0, 24).reshape(in_shape).astype(nptype)
86 input_tensor = constant_op.constant(x, shape=in_shape)
93 in_shape = [1, 4, 6, 3]
[all …]
Dnn_grad.py1111 in_shape = array_ops.shape(op.inputs[0])
1122 math_ops.cast(in_shape, dtypes.int64),
1123 array_ops.size(in_shape) - 1)
1139 [math_ops.reduce_prod(in_shape)]), in_shape),
Dsparse_ops.py2057 in_shape = array_ops.identity(sp_input.dense_shape)
2063 math_ops.add(dim_low_bound, array_ops.ones_like(in_shape)))
2072 in_shape.get_shape().dims[0])
2089 array_ops.shape(in_shape), array_ops.shape(output_shape_tensor))
2092 [check_ops.assert_less_equal(in_shape, output_shape_tensor)],
/external/tensorflow/tensorflow/python/kernel_tests/
Dcudnn_deterministic_base.py74 def _random_out_op(self, in_shape, filter_shape, strides, padding): argument
77 in_op = self._random_data_op(in_shape)
98 in_shape = LayerShapeNCDHW(batch=2, channels=3, depth=5, height=7, width=6)
101 in_op = self._random_data_op(in_shape)
118 in_shape = LayerShapeNHWC(batch=8, height=128, width=128, channels=8)
121 in_op = self._random_data_op(in_shape)
124 out_op = self._random_out_op(in_shape, filter_shape, strides, padding)
132 in_shape = LayerShapeNHWC(batch=8, height=32, width=32, channels=8)
138 out_op = self._random_out_op(in_shape, filter_shape, strides, padding)
140 in_shape, filter_op, out_op, strides=strides, padding=padding)
Dconv2d_backprop_filter_grad_test.py46 in_shape = [5, 8, 6, 4]
48 2 * np.random.random_sample(in_shape) - 1, dtype=dtypes.float32)
68 [in_val, out_backprop_val], [in_shape, out_backprop_shape],
89 in_shape = [5, 8, 6, 4]
91 2 * np.random.random_sample(in_shape) - 1, dtype=dtypes.float32)
113 [in_val, out_backprop_val], [in_shape, out_backprop_shape],
Dextract_image_patches_grad_test.py93 in_shape = test_case['in_shape']
95 np.random.random(in_shape), dtype=dtypes.float32)
154 in_shape = test_case['in_shape']
157 for x, y in zip(test_shape_pattern, in_shape)
161 feed_dict = {in_val: np.random.random(in_shape)}
172 in_val, in_shape, out_val, out_shape)
Dconv3d_backprop_filter_v2_grad_test.py41 in_shape = [2, 4, 3, 3, 2]
43 2 * np.random.random_sample(in_shape) - 1, dtype=dtypes.float32)
59 [in_val, out_backprop_val], [in_shape, out_backprop_shape],
Dextract_volume_patches_grad_test.py60 def testGradient(self, in_shape, ksizes, strides): argument
71 np.random.random(in_shape), dtype=dtypes.float32)
Drnn_test.py314 in_shape = tensor_shape.TensorShape((batch_size, in_size))
315 cell.build(in_shape)
318 cell_output, _ = cell(array_ops.zeros(in_shape, dtype), state_output)
/external/tensorflow/tensorflow/compiler/xla/service/spmd/
Dcanonicalize_all_gather_for_cse.cc35 const Shape& in_shape = inst->operand(0)->shape(); in IsAddingOnlyDegenerateDimensions() local
37 return ShapeUtil::ElementsIn(in_shape) == ShapeUtil::ElementsIn(out_shape) && in IsAddingOnlyDegenerateDimensions()
38 ShapeUtil::DimensionsUnmodifiedByReshape(in_shape, out_shape).size() == in IsAddingOnlyDegenerateDimensions()
39 in_shape.rank(); in IsAddingOnlyDegenerateDimensions()
60 const Shape& in_shape = ag->operand(0)->shape(); in RunOnComputation() local
61 CHECK_EQ(out_shape.dimensions(ag_dim) % in_shape.dimensions(ag_dim), 0); in RunOnComputation()
63 out_shape.dimensions(ag_dim) / in_shape.dimensions(ag_dim); in RunOnComputation()
/external/tensorflow/tensorflow/python/profiler/internal/
Dflops_registry.py66 in_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[0])
67 in_shape.assert_is_fully_defined()
68 return ops.OpStats("flops", in_shape.num_elements() * ops_per_element)
117 in_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[0])
118 in_shape.assert_is_fully_defined()
121 return ops.OpStats("flops", in_shape.num_elements() * 3 - 1)
243 in_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[0])
244 in_shape.assert_is_fully_defined()
247 num_flops = (in_shape.num_elements() * reduce_flops
445 in_shape = graph_util.tensor_shape_from_node_def_name(graph, node.input[0])
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dbcast_ops.cc44 const TensorShape in_shape = ctx->InputShape(i); in Compile() local
45 OP_REQUIRES(ctx, TensorShapeUtils::IsVector(in_shape), in Compile()
47 in_shape.DebugString())); in Compile()
93 const TensorShape in_shape = ctx->InputShape(i); in Compile() local
94 OP_REQUIRES(ctx, TensorShapeUtils::IsVector(in_shape), in Compile()
96 in_shape.DebugString())); in Compile()
Dconcat_op.cc76 const TensorShape& in_shape = shapes[i]; in Compile() local
78 ctx, in_shape.dims() == input_dims, in Compile()
82 "] = ", in_shape.DebugString())); in Compile()
83 if (in_shape.dims() == 0) { in Compile()
89 output_concat_dim += in_shape.dims() > 0 ? in_shape.dim_size(axis) : 1; in Compile()
Dlrn_ops.cc38 const TensorShape in_shape = ctx->InputShape(0); in Compile() local
39 OP_REQUIRES(ctx, in_shape.dims() == 4, in Compile()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dconvert_trivial_transpose_to_reshape.cc27 std::vector<int> in_shape) { in TransposeAffectsMemoryOrder() argument
28 CHECK_EQ(perm.size(), in_shape.size()); in TransposeAffectsMemoryOrder()
34 for (int i = 0, end = in_shape.size(); i < end; i++) { in TransposeAffectsMemoryOrder()
35 if (in_shape[i] != 1) { in TransposeAffectsMemoryOrder()
39 if (in_shape[perm[i]] != 1) { in TransposeAffectsMemoryOrder()
Dmerge_reshape_into_preceding_transpose.cc66 std::vector<int> in_shape = input_array.shape().dims(); in ReshapeToTranspose() local
73 for (size_t i = 0; i < in_shape.size(); i++) { in ReshapeToTranspose()
74 if (in_shape[i] == 1) { in ReshapeToTranspose()
83 perm.reserve(in_shape.size()); in ReshapeToTranspose()
/external/tensorflow/tensorflow/core/kernels/
Dsplit_op_test.cc32 TensorShape in_shape(chunk_size); in MakeGraph() local
33 in_shape.set_dim(split_dim, in_shape.dim_size(split_dim) * num_split); in MakeGraph()
34 Tensor in(DataTypeToEnum<float>::value, in_shape); in MakeGraph()
Dfractional_avg_pool_op.cc260 TensorShape in_shape; in Compute() local
262 in_shape.AddDim(orig_input_tensor_shape_flat(i)); in Compute()
268 {0}, DataTypeToEnum<double>::v(), in_shape, in Compute()
320 {0}, 0, in_shape, &in_backprop_tensor)); in Compute()
Dsplit_v_op_test.cc60 TensorShape in_shape(total_size); in MakeGraph() local
61 Tensor in(DataTypeToEnum<float>::value, in_shape); in MakeGraph()
Dscoped_allocator_ops_test.cc262 void BuildNodeDef(const TensorShape& in_shape, DataType dtype, in BuildNodeDef() argument
278 void MakeOp(const TensorShape& in_shape, DataType dtype, const string& name, in MakeOp() argument
281 BuildNodeDef(in_shape, dtype, name, id, num_tensors, out_shapes); in MakeOp()
Dbias_op.cc394 BiasAddParams(const SpatialArray& in_shape, TensorFormat data_format, in BiasAddParams() argument
396 : in_shape_(in_shape), in BiasAddParams()
/external/tensorflow/tensorflow/compiler/tests/
Dconv3d_test.py43 in_shape = [2, 4, 3, 3, 2]
45 2 * np.random.random_sample(in_shape) - 1, dtype=dtypes.float32)
61 [in_val, out_backprop_val], [in_shape, out_backprop_shape],
/external/tensorflow/tensorflow/compiler/xla/tests/
Dcopy_test.cc245 Shape in_shape = ShapeUtil::MakeShapeWithLayout(F32, {0, 0}, {0, 1}); in XLA_TEST_F() local
247 auto empty = Literal::CreateFromShape(in_shape); in XLA_TEST_F()
250 Parameter(&builder, 0, in_shape, "input"); in XLA_TEST_F()
/external/tensorflow/tensorflow/core/nccl/
Dnccl_manager_test.cc166 TensorShape in_shape, TensorShape out_shape) { in MakeGatherTestCase() argument
178 Tensor in_cpu(data_type_, in_shape); in MakeGatherTestCase()
184 (node * num_ranks_per_node + i) * in_shape.num_elements(); in MakeGatherTestCase()
185 for (int j = 0; j < in_shape.num_elements(); ++j) { in MakeGatherTestCase()
192 test_case->ins.emplace_back(GpuAllocator(device), data_type_, in_shape); in MakeGatherTestCase()
/external/tensorflow/tensorflow/lite/toco/
Dtooling_util.cc2260 std::vector<int> in_shape = input_array.shape().dims(); in ReshapeIsEquivalentToTranspose() local
2265 if (!allow_extra_unary_dims && in_shape.size() != out_shape.size()) { in ReshapeIsEquivalentToTranspose()
2269 in_shape.erase(std::remove(in_shape.begin(), in_shape.end(), 1), in ReshapeIsEquivalentToTranspose()
2270 in_shape.end()); in ReshapeIsEquivalentToTranspose()
2273 return in_shape == out_shape; in ReshapeIsEquivalentToTranspose()

12