/external/tensorflow/tensorflow/python/ops/ |
list_ops.py | 45 def empty_tensor_list(element_shape, 53 element_shape=_build_element_shape(element_shape), 59 def tensor_list_reserve(element_shape, num_elements, element_dtype, name=None): 61 element_shape=_build_element_shape(element_shape), 67 def tensor_list_from_tensor(tensor, element_shape, name=None): 70 element_shape=_build_element_shape(element_shape), 74 def tensor_list_get_item(input_handle, index, element_dtype, element_shape=None [all...] |
tensor_array_ops.py | 58 element_shape=None, 81 element_shape: (optional, default: None) A `TensorShape` object specifying 105 if handle is not None and element_shape is not None: 106 raise ValueError("Cannot provide both a handle and element_shape " 132 # shape is defined either by `element_shape` or the shape of the tensor 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 [all...] |
/external/tensorflow/tensorflow/python/autograph/lang/ |
special_functions.py | 31 def _validate_list_constructor(elements, element_dtype, element_shape): 33 if element_dtype is not None and element_shape is not None: 42 'element_dtype and element_shape are required when elements are' 59 element_shape=None, 74 element_shape: Optional[tf.TensorShape], shape for the elements in the list; 83 _validate_list_constructor(elements, element_dtype, element_shape) 86 element_shape) 89 element_shape)
|
special_functions_test.py | 45 element_shape=()) 52 element_shape=()) 70 ValueError, 'element_dtype and element_shape are required'): 105 t, element_shape=constant_op.constant([], dtype=dtypes.int32))
|
/external/tensorflow/tensorflow/python/autograph/operators/ |
data_structures.py | 57 def tf_tensor_array_new(elements, element_dtype=None, element_shape=None): 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) [all...] |
data_structures_test.py | 52 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 [all...] |
slices_test.py | 32 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/ |
list_ops.cc | 52 .Input("element_shape: shape_type") 61 shape_inference::ShapeHandle element_shape; 63 0, &element_shape)); 66 {element_shape, element_dtype}}); 79 shape_inference::ShapeHandle element_shape = c->UnknownShape(); 98 c->Merge(element_shape, list_shape_type.shape, &ignored)); 99 element_shape = list_shape_type.shape; 103 {element_shape, element_dtype}}); 126 shape_inference::ShapeHandle element_shape = c->UnknownShape(); 145 c->Merge(element_shape, list_shape_type.shape, &ignored)) [all...] |
/external/tensorflow/tensorflow/python/kernel_tests/ |
list_ops_test.py | 51 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) 112 "element_shape is not fully defined"): 117 element_dtype=dtypes.float32, element_shape=[None, 2], num_elements=3) 122 l, element_dtype=dtypes.float32, element_shape=[1, 3] [all...] |
/external/tensorflow/tensorflow/compiler/tests/ |
add_n_test.py | 35 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,
|
tensor_list_ops_test.py | 38 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...] |
/external/tensorflow/tensorflow/core/kernels/ |
list_kernels.h | 60 PartialTensorShape element_shape; member in struct:tensorflow::TensorList 71 PartialTensorShape* element_shape); 112 "list with non-fully-defined element_shape: ", 115 // Check that `element_shape` input tensor is compatible with the shapes of 117 if (!tensor_list->element_shape.IsFullyDefined()) { 128 // the element_shape. 129 TensorShape element_shape; variable 130 OP_REQUIRES(c, partial_element_shape.AsTensorShape(&element_shape), 133 "tensors and has a non-fully-defined element_shape: ", 135 TensorShape output_shape = element_shape; 208 TensorShape element_shape; variable 273 TensorShape element_shape; variable 309 PartialTensorShape element_shape; local 334 PartialTensorShape element_shape; variable 466 TensorShape element_shape = output_shape; variable 505 PartialTensorShape element_shape; variable 612 TensorShape element_shape; variable 680 PartialTensorShape element_shape; variable 801 PartialTensorShape element_shape; variable [all...] |
list_kernels.cc | 44 element_shape(other.element_shape), 69 element_shape.AsProto(&element_shape_proto); 77 to->element_shape = from.element_shape; 141 element_shape = PartialTensorShape(element_shape_proto); 170 PartialTensorShape* element_shape) { 171 TF_RETURN_IF_ERROR(TensorShapeFromTensor(c->input(index), element_shape)); 172 // Check that `element_shape` and `tensor_list.element_shape` ar 239 PartialTensorShape element_shape; variable 385 PartialTensorShape element_shape; variable [all...] |
deserialize_sparse_variant_op.cc | 97 // NOTE(mrry): We define `element_shape` as a `const Tensor*` rather than a 102 const Tensor* element_shape; variable 105 &element_shape, &total_non_zeros)); 108 2, {input_dims_to_stack + element_shape->NumElements()}, 110 const auto element_shape_vec = element_shape->vec<int64>(); 116 for (int64 j = 0; j < element_shape->NumElements(); ++j) { 132 i, &element_shape, &num_non_zeros)); 137 element_shape->NumElements(), 143 "] is: ", element_shape->NumElements())); 144 const auto element_shape_vec = element_shape->vec<int64>() [all...] |
tensor_array.h | 141 int32 N, const PartialTensorShape& element_shape, 155 element_shape_(element_shape), 413 // shaped zero tensors on stack -- even if the initial element_shape 562 TensorShape element_shape; local 568 element_shape = tensors_[index].shape; 578 "element_shape property on the forward TensorArray, the proper " 582 element_shape_.AsTensorShape(&element_shape); // Always succeeds. 589 tensors_[i].shape = element_shape; 593 tensors_[index].shape = element_shape;
|
barrier_ops.cc | 92 TensorShape element_shape = values.shape(); local 94 ctx, keys.NumElements() == 0 || element_shape.num_elements() > 0, 97 element_shape.DebugString()), 99 if (element_shape.dims() > 0) element_shape.RemoveDim(0); 133 InsertOneLocked<T>(ctx, keys, values, element_shape, 307 const Tensor& values, const TensorShape& element_shape, 371 values.dtype(), element_shape, &next_element, &allocated_element));
|
tensor_array_ops.cc | 164 OP_REQUIRES_OK(context, context->GetAttr("element_shape", &element_shape_)); 334 auto element_shape = PartialTensorShape(); variable 348 gtl::ArraySlice<int64>(dims), &element_shape)); 351 element_shape = tensor_array->ElemShape(); 355 auto creator = [key, tensor_array, array_size, marked_size, element_shape, 360 array_size, element_shape, tensor_array->HasIdenticalElementShapes(), 599 OP_REQUIRES_OK(context, context->GetAttr("element_shape", &element_shape_)); 667 errors::InvalidArgument("TensorArray was passed element_shape ", [all...] |
fifo_queue.cc | 92 TensorShape element_shape(tuple[component].shape()); 93 element_shape.RemoveDim(0); 96 tuple[component].dtype(), element_shape, out_tensor, &element_access));
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
tensor_list_ops.cc | 61 // Creates an empty list with size (leading_dim, *element_shape) if 62 // element_shape is known at compile time. Otherwise creates one with size 79 TensorShape element_shape; local 80 partial_element_shape.AsTensorShape(&element_shape); 81 list_shape.AppendShape(element_shape); 83 // If element_shape is not a compile time constant or if it is not fully 86 // TODO(srbs): We are using element_shape of [0] as a proxy to denote an 126 .CompileTimeConstantInput("element_shape") 162 .CompileTimeConstantInput("element_shape") 273 PartialTensorShape element_shape; variable [all...] |
/external/tensorflow/tensorflow/compiler/xla/ |
layout_util.cc | 145 for (auto& element_shape : *shape->mutable_tuple_shapes()) { 146 SetToDefaultLayout(&element_shape); 180 for (auto& element_shape : shape.tuple_shapes()) { 182 ValidateLayoutInShape(element_shape, allow_missing_layouts)); 261 for (auto& element_shape : *shape->mutable_tuple_shapes()) { 262 ClearLayout(&element_shape);
|
shape.cc | 50 for (const ShapeProto& element_shape : shape_proto.tuple_shapes()) { 51 *add_tuple_shapes() = Shape(element_shape);
|
/external/tensorflow/tensorflow/compiler/xla/service/ |
copy_insertion_test.cc | 1699 const Shape element_shape = ShapeUtil::MakeShape(F32, {42}); local 1878 const Shape element_shape = ShapeUtil::MakeShape(F32, {42}); local 1995 const Shape element_shape = ShapeUtil::MakeShape(F32, {}); local 2014 const Shape element_shape = ShapeUtil::MakeShape(F32, {}); local [all...] |
/external/tensorflow/tensorflow/python/autograph/utils/ |
tensors_test.py | 36 element_shape=constant_op.constant([1]), element_dtype=dtypes.int32)
|
/external/tensorflow/tensorflow/python/autograph/converters/ |
slices_test.py | 49 [1, 2], element_shape=constant_op.constant([], dtype=dtypes.int32))
|
/external/tensorflow/tensorflow/core/kernels/data/ |
padded_batch_dataset_op.cc | 287 const TensorShape& element_shape = variable 291 if (element_shape.dims() != padded_shape.dims()) { 296 " but got element with rank ", element_shape.dims());
|