tensorflow::PartialTensorShape

#include <partial_tensor_shape.h>

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

Summary

Constructors and Destructors

PartialTensorShape()
Construct an unknown PartialTensorShape.
PartialTensorShape(gtl::ArraySlice< int64 > dim_sizes)
Construct a PartialTensorShape from the provided sizes.
PartialTensorShape(std::initializer_list< int64 > dim_sizes)
PartialTensorShape(const TensorShapeProto & proto)
REQUIRES: IsValid(proto)

Public functions

AsProto(TensorShapeProto *proto) const
void
Fill *proto from *this.
AsTensorShape(TensorShape *tensor_shape) const
bool
Concatenate(int64 size) const
Add a dimension to the end ("inner-most"), returns a new PartialTensorShape.
Concatenate(const PartialTensorShape & shape) const
Appends all the dimensions from shape.
DebugString() const
string
For error messages.
IsCompatibleWith(const PartialTensorShape & shape) const
bool
Return true iff the ranks match, and if the dimensions all either match or one is unknown.
IsCompatibleWith(const TensorShape & shape) const
bool
Return true iff the dimensions of shape are compatible with *this.
IsFullyDefined() const
bool
Return true iff the rank and all of the dimensions are well defined.
IsIdenticalTo(const PartialTensorShape & shape) const
bool
Exact equality test.
MergeWith(const PartialTensorShape & shape, PartialTensorShape *result) const
Merges all the dimensions from shape.
dim_size(int d) const
int64
Returns the number of elements in dimension d.
dim_sizes() const
gtl::ArraySlice< int64 >
Returns sizes of all dimensions.
dims() const
int
Return the number of dimensions in the tensor.

Public static functions

DebugString(const TensorShapeProto & proto)
string
IsValid(const TensorShapeProto & proto)
bool
Returns true iff proto is a valid partial tensor sh