TNumber
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
TBfloat16 |
Brain 16-bit float tensor type. |
TFloat16 |
IEEE-754 half-precision 16-bit float tensor type. |
TFloat32 |
IEEE-754 single-precision 32-bit float tensor type. |
TFloat64 |
IEEE-754 double-precision 64-bit float tensor type. |
TFloating |
Common interface for all floating point tensors. |
TInt32 |
32-bit signed integer tensor type. |
TInt64 |
64-bit signed integer tensor type. |
TIntegral |
Common interface for all integral numeric tensors. |
TUint8 |
8-bit unsigned integer tensor type. |
|
Common interface for all numeric tensors.
Operations that only accepts numeric values as some of their operands enforce that the tensor
types for these operands to be bound to this interface. For example:
Ops tf = Ops.create();
Constant<TFloat32> c1 = tf.array(1.0f, 2.0f, 3.0f);
Constant<TFloat32> c2 = tf.array(true, false, true);
tf.nn.softmax(c1); // OK
tf.nn.softmax(c2); // Compilation failure
Inherited Methods
From interface
org.tensorflow.Tensor
abstract
RawTensor
|
asRawTensor()
Returns a raw (untyped) representation of this tensor
|
abstract
void
|
close()
Release resources associated with the Tensor.
|
abstract
DataType
|
|
abstract
long
|
numBytes()
Returns the size, in bytes, of the tensor data.
|
abstract
static
<T extends TType>
T
|
of(Class<T> type, Shape shape, long size, Consumer<T> dataInitializer)
Allocates a tensor of a given datatype, shape and size.
|
abstract
static
<T extends TType>
T
|
of(Class<T> type, Shape shape)
Allocates a tensor of a given datatype and shape.
|
abstract
static
<T extends TType>
T
|
of(Class<T> type, Shape shape, long size)
Allocates a tensor of a given datatype, shape and size.
|
abstract
static
<T extends TType>
T
|
of(Class<T> type, Shape shape, Consumer<T> dataInitializer)
Allocates and initialize a tensor of a given datatype and shape.
|
abstract
static
<T extends TType>
T
|
of(Class<T> type, Shape shape, ByteDataBuffer rawData)
Creates a Tensor of any type from the raw data provided by the given buffer.
|
abstract
Shape
|
shape()
Returns the shape of the tensor.
|
From interface
java.lang.AutoCloseable
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-11-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-29 UTC."],[],[]]