aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/g3doc/api_docs/cc/ClassPartialTensorShape.md
blob: ac2c26093de8394adcac356d5bb342b1171033aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# `class tensorflow::PartialTensorShape`

Manages the partially known dimensions of a Tensor and their sizes.



###Member Details

#### `tensorflow::PartialTensorShape::PartialTensorShape()` {#tensorflow_PartialTensorShape_PartialTensorShape}

Construct an unknown ` PartialTensorShape `.



#### `tensorflow::PartialTensorShape::PartialTensorShape(gtl::ArraySlice< int64 > dim_sizes)` {#tensorflow_PartialTensorShape_PartialTensorShape}

Construct a ` PartialTensorShape ` from the provided sizes. REQUIRES: `dim_sizes[i] >= 0`



#### `tensorflow::PartialTensorShape::PartialTensorShape(std::initializer_list< int64 > dim_sizes)` {#tensorflow_PartialTensorShape_PartialTensorShape}





#### `tensorflow::PartialTensorShape::PartialTensorShape(const TensorShapeProto &proto)` {#tensorflow_PartialTensorShape_PartialTensorShape}

REQUIRES: `IsValid(proto)`



#### `PartialTensorShape tensorflow::PartialTensorShape::Concatenate(int64 size) const` {#PartialTensorShape_tensorflow_PartialTensorShape_Concatenate}



Add a dimension to the end ("inner-most"), returns a new PartialTensorShape . REQUIRES: `size >= -1`, where -1 means unknown

#### `PartialTensorShape tensorflow::PartialTensorShape::Concatenate(const PartialTensorShape &shape) const` {#PartialTensorShape_tensorflow_PartialTensorShape_Concatenate}



Appends all the dimensions from `shape`. Returns a new PartialTensorShape .

#### `Status tensorflow::PartialTensorShape::MergeWith(const PartialTensorShape &shape, PartialTensorShape *result) const` {#Status_tensorflow_PartialTensorShape_MergeWith}



Merges all the dimensions from `shape`. Returns `InvalidArgument` error if either `shape` has a different rank or if any of the dimensions are incompatible.

#### `int tensorflow::PartialTensorShape::dims() const` {#int_tensorflow_PartialTensorShape_dims}



Return the number of dimensions in the tensor. If the number of dimensions is unknown, return -1.

#### `bool tensorflow::PartialTensorShape::IsFullyDefined() const` {#bool_tensorflow_PartialTensorShape_IsFullyDefined}

Return true iff the rank and all of the dimensions are well defined.



#### `bool tensorflow::PartialTensorShape::IsIdenticalTo(const PartialTensorShape &shape) const` {#bool_tensorflow_PartialTensorShape_IsIdenticalTo}



Exact equality test. Returns true iff the ranks match (i.e., both are unknown, or both are known and equal), and all dimensions are equal (i.e., both dimensions are known, or both are known and equal). This is a stronger condition that IsCompatibleWith.

#### `bool tensorflow::PartialTensorShape::IsCompatibleWith(const PartialTensorShape &shape) const` {#bool_tensorflow_PartialTensorShape_IsCompatibleWith}



Return true iff the ranks match, and if the dimensions all either match or one is unknown.

#### `bool tensorflow::PartialTensorShape::IsCompatibleWith(const TensorShape &shape) const` {#bool_tensorflow_PartialTensorShape_IsCompatibleWith}



Return true iff the dimensions of `shape` are compatible with `*this`.

#### `int64 tensorflow::PartialTensorShape::dim_size(int d) const` {#int64_tensorflow_PartialTensorShape_dim_size}

Returns the number of elements in dimension `d`. REQUIRES: `0 <= d < dims() `



#### `gtl::ArraySlice<int64> tensorflow::PartialTensorShape::dim_sizes() const` {#gtl_ArraySlice_int64_tensorflow_PartialTensorShape_dim_sizes}

Returns sizes of all dimensions.



#### `void tensorflow::PartialTensorShape::AsProto(TensorShapeProto *proto) const` {#void_tensorflow_PartialTensorShape_AsProto}

Fill `*proto` from `*this`.



#### `bool tensorflow::PartialTensorShape::AsTensorShape(TensorShape *tensor_shape) const` {#bool_tensorflow_PartialTensorShape_AsTensorShape}





#### `string tensorflow::PartialTensorShape::DebugString() const` {#string_tensorflow_PartialTensorShape_DebugString}

For error messages.



#### `bool tensorflow::PartialTensorShape::IsValid(const TensorShapeProto &proto)` {#bool_tensorflow_PartialTensorShape_IsValid}

Returns `true` iff `proto` is a valid partial tensor shape.



#### `Status tensorflow::PartialTensorShape::IsValidShape(const TensorShapeProto &proto)` {#Status_tensorflow_PartialTensorShape_IsValidShape}



Returns `OK` iff `proto` is a valid tensor shape, and a descriptive error status otherwise.

#### `string tensorflow::PartialTensorShape::DebugString(const TensorShapeProto &proto)` {#string_tensorflow_PartialTensorShape_DebugString}





#### `static Status tensorflow::PartialTensorShape::MakePartialShape(const int32 *dims, int n, PartialTensorShape *out)` {#static_Status_tensorflow_PartialTensorShape_MakePartialShape}

Returns a ` PartialTensorShape ` whose dimensions are `dims[0]`, `dims[1]`, ..., `dims[n-1]`. Values of -1 are considered "unknown".



#### `static Status tensorflow::PartialTensorShape::MakePartialShape(const int64 *dims, int n, PartialTensorShape *out)` {#static_Status_tensorflow_PartialTensorShape_MakePartialShape}