@Name(value="tensorflow::TensorShapeBase<tensorflow::TensorShape>") @NoOffset public static class tensorflow.TensorShapeBase extends tensorflow.TensorShapeRep
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
TensorShapeBase()
Construct an empty TensorShape, or an unknown rank PartialTensorShape
|
TensorShapeBase(long... dim_sizes) |
TensorShapeBase(long size)
Native array allocator.
|
TensorShapeBase(LongBuffer dim_sizes) |
TensorShapeBase(LongPointer dim_sizes)
\brief Construct a
TensorShapeBase from the provided sizes. |
TensorShapeBase(Pointer p)
Pointer cast constructor.
|
TensorShapeBase(tensorflow.TensorShapeProto proto) |
| Modifier and Type | Method and Description |
|---|---|
void |
AddDim(long size)
\brief Add a dimension to the end ("inner-most").
|
void |
AppendShape(tensorflow.TensorShapeBase shape)
Appends all the dimensions from
shape. |
void |
AsProto(tensorflow.TensorShapeProto proto)
Fill
*proto from *this. |
tensorflow.TensorShapeIter |
begin()
For iterating through the dimensions.
|
long |
dim_size(int d)
\brief Returns the number of elements in dimension
d. |
tensorflow.LongVector |
dim_sizes()
Returns sizes of all dimensions.
|
int |
dims()
Return the number of dimensions in the tensor.
|
tensorflow.TensorShapeIter |
end() |
void |
InsertDim(int d,
long size)
\brief Insert a dimension somewhere in the
TensorShape. |
boolean |
IsFullyDefined()
Return true iff the rank and all of the dimensions are well defined
|
static boolean |
IsValid(tensorflow.TensorShapeProto proto)
Returns
true iff proto is a valid tensor shape. |
static tensorflow.Status |
IsValidShape(tensorflow.TensorShapeProto proto)
Returns
OK iff proto is a valid tensor shape, and a descriptive error
status otherwise. |
tensorflow.TensorShapeBase |
position(long position) |
void |
RemoveDim(int d)
\brief Removes dimension
d from the TensorShape. |
void |
RemoveDimRange(int begin,
int end)
\brief Removes the dimensions in range
[begin:end) from TensorShape. |
void |
RemoveLastDims(int n)
\brief Removes last
n dimensions from the TensorShape. |
void |
set_dim(int d,
long size)
\brief Modifies the size of the dimension
d to be size
REQUIRES: 0 <= d < dims()
REQUIRES: size >= 0 |
boolean |
unknown_rank()
Return whether the rank is unknown
|
Clear, DebugString, DebugString, DumpRep, MaxDimensions, num_elements, putaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic TensorShapeBase(Pointer p)
Pointer.Pointer(Pointer).public TensorShapeBase(long size)
Pointer.position(long).public TensorShapeBase(@Cast(value="tensorflow::int64*") @tensorflow.ArraySlice LongPointer dim_sizes)
TensorShapeBase from the provided sizes.
REQUIRES: dim_sizes[i] >= 0 (or >= -1 for PartialTensorShape)public TensorShapeBase(@Cast(value="tensorflow::int64*") @tensorflow.ArraySlice LongBuffer dim_sizes)
public TensorShapeBase(@Cast(value="tensorflow::int64*") @tensorflow.ArraySlice long... dim_sizes)
public TensorShapeBase()
public TensorShapeBase(@Const @ByRef tensorflow.TensorShapeProto proto)
public tensorflow.TensorShapeBase position(long position)
@Cast(value="bool") public static boolean IsValid(@Const @ByRef tensorflow.TensorShapeProto proto)
true iff proto is a valid tensor shape.@ByVal public static tensorflow.Status IsValidShape(@Const @ByRef tensorflow.TensorShapeProto proto)
OK iff proto is a valid tensor shape, and a descriptive error
status otherwise.public void AddDim(@Cast(value="tensorflow::int64") long size)
size >= 0public void AppendShape(@Const @ByRef tensorflow.TensorShapeBase shape)
shape.public void InsertDim(int d,
@Cast(value="tensorflow::int64")
long size)
TensorShape.
REQUIRES: 0 <= d <= dims()
REQUIRES: size >= 0public void set_dim(int d,
@Cast(value="tensorflow::int64")
long size)
d to be size
REQUIRES: 0 <= d < dims()
REQUIRES: size >= 0public void RemoveDim(int d)
d from the TensorShape.
REQUIRES: 0 <= d < dims()public void RemoveLastDims(int n)
n dimensions from the TensorShape.
REQUIRES: 0 <= n <= dims()public void RemoveDimRange(int begin,
int end)
[begin:end) from TensorShape.
Negative values of end are interpreted as dims() + end + 1 (as in
Python). The same is true for negative values of begin. REQUIRES:
-(dims()+1) <= begin <= dims() REQUIRES: -(dims()+1) <= end <= dims()public int dims()
@Cast(value="tensorflow::int64") public long dim_size(int d)
d.
REQUIRES: 0 <= d < dims()@ByVal public tensorflow.LongVector dim_sizes()
@Cast(value="bool") public boolean IsFullyDefined()
public void AsProto(tensorflow.TensorShapeProto proto)
*proto from *this.@ByVal public tensorflow.TensorShapeIter begin()
@ByVal public tensorflow.TensorShapeIter end()
Copyright © 2019. All rights reserved.