Home
last modified time | relevance | path

Searched refs:element_shape (Results 1 – 25 of 78) sorted by relevance

1234

/external/tensorflow/tensorflow/python/ops/
Dlist_ops.py45 def empty_tensor_list(element_shape, argument
53 element_shape=_build_element_shape(element_shape),
59 def tensor_list_reserve(element_shape, num_elements, element_dtype, name=None): argument
61 element_shape=_build_element_shape(element_shape),
67 def tensor_list_from_tensor(tensor, element_shape, name=None): argument
70 element_shape=_build_element_shape(element_shape),
74 def tensor_list_get_item(input_handle, index, element_dtype, element_shape=None, argument
79 element_shape=_build_element_shape(element_shape),
87 element_shape=-1,
95 element_shape=None, argument
[all …]
Dtensor_array_ops.py58 element_shape=None, argument
105 if handle is not None and element_shape is not None:
135 if element_shape is None:
140 self._element_shape = [tensor_shape.TensorShape(element_shape)]
156 element_shape=element_shape,
302 element_shape = self._element_shape[0]
304 element_shape = tensor_shape.TensorShape(None)
311 element_shape=element_shape)
427 element_shape=None, argument
470 if flow is not None and element_shape is not None:
[all …]
/external/tensorflow/tensorflow/python/autograph/operators/
Ddata_structures.py57 def tf_tensor_array_new(elements, element_dtype=None, element_shape=None): argument
79 if element_shape is not None and element_shape != inferred_shape:
82 element_shape, elements, inferred_shape))
93 if element_shape is None:
94 element_shape = inferred_shape
100 infer_shape=(element_shape is None),
101 element_shape=element_shape)
107 def tf_tensor_list_new(elements, element_dtype=None, element_shape=None): argument
110 if element_shape is not None:
113 element_shape = array_ops.shape(elements)[1:]
[all …]
Ddata_structures_test.py52 element_shape=())
73 data_structures.tf_tensor_list_new([3, 4], element_shape=(2,))
76 constant_op.constant([1, 2, 3]), element_shape=[1])
92 data_structures.tf_tensor_array_new([3, 4], element_shape=(2,))
94 data_structures.tf_tensor_array_new([], element_shape=(2,))
126 l = list_ops.tensor_list_from_tensor(initial_list, element_shape=elem_shape)
130 element_shape=(2,))
144 opts = data_structures.ListPopOpts(element_dtype=None, element_shape=())
151 l = list_ops.tensor_list_from_tensor(initial_list, element_shape=elem_shape)
163 element_shape=None, element_dtype=dtypes.variant)
Dslices_test.py32 l = list_ops.tensor_list_from_tensor(initial_list, element_shape=elem_shape)
42 l = list_ops.tensor_list_from_tensor(initial_list, element_shape=elem_shape)
/external/tensorflow/tensorflow/core/ops/
Dlist_ops.cc61 shape_inference::ShapeHandle element_shape; in __anon9187032f0202() local
63 0, &element_shape)); in __anon9187032f0202()
66 {element_shape, element_dtype}}); in __anon9187032f0202()
79 shape_inference::ShapeHandle element_shape = c->UnknownShape(); in __anon9187032f0302() local
98 c->Merge(element_shape, list_shape_type.shape, &ignored)); in __anon9187032f0302()
99 element_shape = list_shape_type.shape; in __anon9187032f0302()
103 {element_shape, element_dtype}}); in __anon9187032f0302()
126 shape_inference::ShapeHandle element_shape = c->UnknownShape(); in __anon9187032f0402() local
145 c->Merge(element_shape, list_shape_type.shape, &ignored)); in __anon9187032f0402()
146 element_shape = list_shape_type.shape; in __anon9187032f0402()
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dlist_ops_test.py51 element_shape=[],
73 element_dtype=dtypes.float32, element_shape=[], max_num_elements=1)
86 element_shape=[],
95 element_dtype=dtypes.float32, element_shape=[2, 3], num_elements=3)
101 element_dtype=dtypes.float32, element_shape=[None, 3], num_elements=3)
103 l, element_dtype=dtypes.float32, element_shape=[4, 3])
108 element_dtype=dtypes.float32, element_shape=None, num_elements=3)
117 element_dtype=dtypes.float32, element_shape=[None, 2], num_elements=3)
122 l, element_dtype=dtypes.float32, element_shape=[1, 3])
128 element_dtype=dtypes.float32, element_shape=None)
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dlist_kernels.h60 PartialTensorShape element_shape; member
71 PartialTensorShape* element_shape);
117 if (!tensor_list->element_shape.IsFullyDefined()) { in Compute()
129 TensorShape element_shape; in Compute() local
130 OP_REQUIRES(c, partial_element_shape.AsTensorShape(&element_shape), in Compute()
135 TensorShape output_shape = element_shape; in Compute()
157 c, c->allocate_temp(element_dtype_, element_shape, &zeros, attr)); in Compute()
208 TensorShape element_shape; in Compute() local
227 c, partial_element_shape.AsTensorShape(&element_shape), in Compute()
237 OP_REQUIRES_OK(c, c->allocate_output(0, element_shape, &result, attr)); in Compute()
[all …]
Dlist_kernels.cc44 element_shape(other.element_shape), in TensorList()
69 element_shape.AsProto(&element_shape_proto); in Encode()
77 to->element_shape = from.element_shape; in TensorListDeviceCopy()
141 element_shape = PartialTensorShape(element_shape_proto); in Decode()
170 PartialTensorShape* element_shape) { in GetElementShapeFromInput() argument
171 TF_RETURN_IF_ERROR(TensorShapeFromTensor(c->input(index), element_shape)); in GetElementShapeFromInput()
174 PartialTensorShape tmp = *element_shape; in GetElementShapeFromInput()
175 TF_RETURN_IF_ERROR(tmp.MergeWith(tensor_list.element_shape, element_shape)); in GetElementShapeFromInput()
239 PartialTensorShape element_shape; in Compute() local
240 OP_REQUIRES_OK(ctx, TensorShapeFromTensor(ctx->input(0), &element_shape)); in Compute()
[all …]
Ddeserialize_sparse_variant_op.cc102 const Tensor* element_shape; in Compute() local
105 &element_shape, &total_non_zeros)); in Compute()
108 2, {input_dims_to_stack + element_shape->NumElements()}, in Compute()
110 const auto element_shape_vec = element_shape->vec<int64>(); in Compute()
116 for (int64 j = 0; j < element_shape->NumElements(); ++j) { in Compute()
132 i, &element_shape, &num_non_zeros)); in Compute()
137 element_shape->NumElements(), in Compute()
143 "] is: ", element_shape->NumElements())); in Compute()
144 const auto element_shape_vec = element_shape->vec<int64>(); in Compute()
145 for (int j = 0; j < element_shape->NumElements(); ++j) { in Compute()
Dtensor_array_ops.cc334 auto element_shape = PartialTensorShape(); in CreateTensorArray() local
348 gtl::ArraySlice<int64>(dims), &element_shape)); in CreateTensorArray()
351 element_shape = tensor_array->ElemShape(); in CreateTensorArray()
355 auto creator = [key, tensor_array, array_size, marked_size, element_shape, in CreateTensorArray()
360 array_size, element_shape, tensor_array->HasIdenticalElementShapes(), in CreateTensorArray()
1046 TensorShape element_shape(tensor_value->shape()); in Compute() local
1049 FastBoundsCheck(element_shape.dim_size(0), in Compute()
1059 OP_REQUIRES(ctx, element_shape.dims() > 0, in Compute()
1062 element_shape.DebugString())); in Compute()
1070 num_values = element_shape.dim_size(0); in Compute()
[all …]
Dbarrier_ops.cc92 TensorShape element_shape = values.shape(); in TryInsertMany() local
94 ctx, keys.NumElements() == 0 || element_shape.num_elements() > 0, in TryInsertMany()
97 element_shape.DebugString()), in TryInsertMany()
99 if (element_shape.dims() > 0) element_shape.RemoveDim(0); in TryInsertMany()
133 InsertOneLocked<T>(ctx, keys, values, element_shape, in TryInsertMany()
307 const Tensor& values, const TensorShape& element_shape, in InsertOneLocked() argument
371 values.dtype(), element_shape, &next_element, &allocated_element)); in InsertOneLocked()
Dtensor_array.h141 int32 N, const PartialTensorShape& element_shape, in TensorArray() argument
155 element_shape_(element_shape), in TensorArray()
562 TensorShape element_shape; in LockedRead() local
568 element_shape = tensors_[index].shape; in LockedRead()
582 element_shape_.AsTensorShape(&element_shape); // Always succeeds. in LockedRead()
589 tensors_[i].shape = element_shape; in LockedRead()
593 tensors_[index].shape = element_shape; in LockedRead()
/external/tensorflow/tensorflow/python/autograph/lang/
Dspecial_functions.py31 def _validate_list_constructor(elements, element_dtype, element_shape): argument
33 if element_dtype is not None and element_shape is not None:
59 element_shape=None, argument
83 _validate_list_constructor(elements, element_dtype, element_shape)
86 element_shape)
89 element_shape)
Dspecial_functions_test.py45 element_shape=())
52 element_shape=())
105 t, element_shape=constant_op.constant([], dtype=dtypes.int32))
/external/tensorflow/tensorflow/compiler/tests/
Dtensor_list_ops_test.py38 element_shape=(dim, 15),
49 element_shape=(7, 15),
65 element_shape=(7, 15),
83 element_shape=[],
100 element_shape=(7, 15), element_dtype=dtypes.float32)
111 element_shape=(10, 15), element_dtype=dtypes.float32,
121 l = list_ops.tensor_list_from_tensor(t, element_shape=[])
133 l = list_ops.tensor_list_from_tensor(t, element_shape=[])
143 element_shape=[], element_dtype=dtypes.float32, max_num_elements=2)
154 element_dtype=dtypes.float32, element_shape=[], num_elements=2)
[all …]
Dadd_n_test.py35 element_shape=[], element_dtype=dtypes.float32, num_elements=3)
37 element_shape=[], element_dtype=dtypes.float32, num_elements=3)
49 element_shape=[], element_dtype=dtypes.float32, num_elements=2)
51 element_shape=[], element_dtype=dtypes.float32, num_elements=3)
65 element_shape=l1_element_shape,
69 element_shape=l2_element_shape,
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dtensor_list_ops.cc79 TensorShape element_shape; in CreateZerosList() local
80 partial_element_shape.AsTensorShape(&element_shape); in CreateZerosList()
81 list_shape.AppendShape(element_shape); in CreateZerosList()
273 PartialTensorShape element_shape; in Compile() local
274 OP_REQUIRES_OK(ctx, ctx->ConstantInputAsPartialShape(1, &element_shape)); in Compile()
281 element_shape.MergeWith( in Compile()
315 const TensorShape& element_shape, DataType dtype, in GetInitializedList() argument
326 TF_RET_CHECK(element_shape == input_list_element_shape); in GetInitializedList()
332 TensorShape output_list_shape = element_shape; in GetInitializedList()
/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_TensorListConcatV2.pbtxt8 element_shape: The shape of the uninitialized elements in the list. If the first
12 the leading dim of input_handle.element_shape or the element_shape input arg
Dapi_def_EmptyTensorList.pbtxt6 with element_shape.
10 element_shape: a shape compatible with that of elements in the list.
Dapi_def_TensorArrayV3.pbtxt31 name: "element_shape"
60 shaped zero tensors on stack -- even if the element_shape attribute
Dapi_def_TensorListElementShape.pbtxt6 element_shape: the shape of elements of the list
/external/tensorflow/tensorflow/compiler/xla/service/
Dcopy_insertion_test.cc1699 const Shape element_shape = ShapeUtil::MakeShape(F32, {42}); in TEST_F() local
1701 {element_shape, element_shape, element_shape, element_shape}); in TEST_F()
1706 HloInstruction::CreateParameter(0, element_shape, "param_0")); in TEST_F()
1708 HloInstruction::CreateParameter(1, element_shape, "param_1")); in TEST_F()
1710 HloInstruction::CreateParameter(2, element_shape, "param_2")); in TEST_F()
1712 HloInstruction::CreateParameter(3, element_shape, "param_3")); in TEST_F()
1728 HloInstruction::CreateGetTupleElement(element_shape, body_param, 0)); in TEST_F()
1730 HloInstruction::CreateGetTupleElement(element_shape, body_param, 1)); in TEST_F()
1732 HloInstruction::CreateGetTupleElement(element_shape, body_param, 2)); in TEST_F()
1734 HloInstruction::CreateGetTupleElement(element_shape, body_param, 3)); in TEST_F()
[all …]
/external/tensorflow/tensorflow/compiler/xla/
Dlayout_util.cc145 for (auto& element_shape : *shape->mutable_tuple_shapes()) { in SetToDefaultLayout()
146 SetToDefaultLayout(&element_shape); in SetToDefaultLayout()
180 for (auto& element_shape : shape.tuple_shapes()) { in ValidateLayoutInShape() local
182 ValidateLayoutInShape(element_shape, allow_missing_layouts)); in ValidateLayoutInShape()
261 for (auto& element_shape : *shape->mutable_tuple_shapes()) { in ClearLayout()
262 ClearLayout(&element_shape); in ClearLayout()
/external/tensorflow/tensorflow/compiler/xla/tests/
Dwhile_test.cc951 auto element_shape = ShapeUtil::MakeShape(F32, {2}); in XLA_TEST_F() local
954 auto p = Parameter(&outer, 0, element_shape, "param"); in XLA_TEST_F()
983 auto element_shape = ShapeUtil::MakeShape(F32, {2}); in XLA_TEST_F() local
986 auto p = Parameter(&outer, 0, element_shape, "param"); in XLA_TEST_F()
989 auto cond_t = Parameter(&cond, 0, element_shape, "t"); in XLA_TEST_F()
993 Parameter(&body, 0, element_shape, "t"); in XLA_TEST_F()
1008 auto element_shape = ShapeUtil::MakeShape(F32, {}); in XLA_TEST_F() local
1011 auto p = Parameter(&outer, 0, element_shape, "param"); in XLA_TEST_F()
1014 auto cond_t = Parameter(&cond, 0, element_shape, "t"); in XLA_TEST_F()
1018 auto body_t = Parameter(&body, 0, element_shape, "t"); in XLA_TEST_F()

1234