Home
last modified time | relevance | path

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

12

/external/tensorflow/tensorflow/python/ops/
Dimage_grad_test.py38 in_shape = [1, 2, 2, 1]
42 x = np.arange(0, 4).reshape(in_shape).astype(nptype)
45 input_tensor = constant_op.constant(x, shape=in_shape)
55 in_shape = [1, 2, 3, 1]
59 x = np.arange(0, 6).reshape(in_shape).astype(nptype)
62 input_tensor = constant_op.constant(x, shape=in_shape)
66 input_tensor, in_shape, resize_out, out_shape, x_init_value=x)
71 in_shape = [1, 4, 6, 1]
75 x = np.arange(0, 24).reshape(in_shape).astype(nptype)
78 input_tensor = constant_op.constant(x, shape=in_shape)
[all …]
Dnn_grad.py1056 in_shape = array_ops.shape(op.inputs[0])
1067 math_ops.cast(in_shape, dtypes.int64),
1068 array_ops.size(in_shape) - 1)
1084 [math_ops.reduce_prod(in_shape)]), in_shape),
Dsparse_ops.py1771 in_shape = array_ops.identity(sp_input.dense_shape)
1777 math_ops.add(dim_low_bound, array_ops.ones_like(in_shape)))
1786 in_shape.get_shape().dims[0])
1803 array_ops.shape(in_shape), array_ops.shape(output_shape_tensor))
1806 [check_ops.assert_less_equal(in_shape, output_shape_tensor)],
/external/tensorflow/tensorflow/python/kernel_tests/
Dcudnn_determinism_test.py55 def _random_out_op(self, in_shape, filter_shape): argument
58 in_op = self._random_data_op(in_shape)
76 in_shape = LayerShape(batch=8, height=128, width=128, channels=8)
78 in_op = self._random_data_op(in_shape)
79 out_op = self._random_out_op(in_shape, filter_shape)
87 in_shape = LayerShape(batch=8, height=32, width=32, channels=8)
91 out_op = self._random_out_op(in_shape, filter_shape)
93 in_shape, filter_op, out_op, strides=_STRIDES, padding=_PADDING)
Dconv2d_backprop_filter_grad_test.py41 in_shape = [5, 8, 6, 4]
43 2 * np.random.random_sample(in_shape) - 1, dtype=dtypes.float32)
63 [in_val, out_backprop_val], [in_shape, out_backprop_shape],
75 in_shape = [5, 8, 6, 4]
77 2 * np.random.random_sample(in_shape) - 1, dtype=dtypes.float32)
99 [in_val, out_backprop_val], [in_shape, out_backprop_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.py69 in_shape = test_case['in_shape']
71 np.random.random(in_shape), dtype=dtypes.float32)
78 err = gradient_checker.compute_gradient_error(in_val, in_shape,
Dextract_image_patches_grad_test.py91 in_shape = test_case['in_shape']
93 np.random.random(in_shape), dtype=dtypes.float32)
101 err = gradient_checker.compute_gradient_error(in_val, in_shape,
/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; i < in_shape.size(); 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 (int 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.cc261 void BuildNodeDef(const TensorShape& in_shape, DataType dtype, in BuildNodeDef() argument
277 void MakeOp(const TensorShape& in_shape, DataType dtype, const string& name, in MakeOp() argument
280 BuildNodeDef(in_shape, dtype, name, id, num_tensors, out_shapes); in MakeOp()
Dbias_op.cc426 BiasAddParams(const SpatialArray& in_shape, TensorFormat data_format, in BiasAddParams() argument
428 : 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.cc138 TensorShape in_shape, TensorShape out_shape) { in MakeGatherTestCase() argument
150 Tensor in_cpu(data_type_, in_shape); in MakeGatherTestCase()
156 (node * num_ranks_per_node + i) * in_shape.num_elements(); in MakeGatherTestCase()
157 for (int j = 0; j < in_shape.num_elements(); ++j) { in MakeGatherTestCase()
164 test_case->ins.emplace_back(GpuAllocator(device), data_type_, in_shape); in MakeGatherTestCase()
/external/tensorflow/tensorflow/contrib/quantize/python/
Dfold_batch_norms.py951 in_shape = in_tensor.get_shape()
954 if not in_shape.is_compatible_with(out_shape):
956 'output %s' % (op_name, in_shape, out_shape))
/external/tensorflow/tensorflow/lite/toco/
Dtooling_util.cc2216 std::vector<int> in_shape = input_array.shape().dims(); in ReshapeIsEquivalentToTranspose() local
2221 if (!allow_extra_unary_dims && in_shape.size() != out_shape.size()) { in ReshapeIsEquivalentToTranspose()
2225 in_shape.erase(std::remove(in_shape.begin(), in_shape.end(), 1), in ReshapeIsEquivalentToTranspose()
2226 in_shape.end()); in ReshapeIsEquivalentToTranspose()
2229 return in_shape == out_shape; in ReshapeIsEquivalentToTranspose()
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_graph.cc453 TensorShapeProto in_shape; in CreateTRTNode() local
454 conn.outside_shape.AsProto(&in_shape); in CreateTRTNode()
459 input_shape_protos.at(conn.port_number) = in_shape; in CreateTRTNode()

12