TIntegral
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
TInt32 |
32-bit signed integer tensor type. |
TInt64 |
64-bit signed integer tensor type. |
TUint8 |
8-bit unsigned integer tensor type. |
|
Common interface for all integral numeric tensors.
Operations that only accepts integral values as some of their operands enforce that the tensor
types for these operands to be bound to this interface.
Inherited Methods
From interface
org.tensorflow.types.family.TType
abstract
void
|
close()
Release resources associated with the Tensor.
|
abstract
DataType
|
|
abstract
long
|
numBytes()
Returns the size, in bytes, of the tensor data.
|
abstract
Class<? extends TType>
|
type()
Returns the type of this tensor as a registered subclass of TType
|
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
org.tensorflow.ndarray.Shaped
abstract
int
|
|
abstract
Shape
|
|
abstract
long
|
size()
Computes and returns the total size of this container, in number of values.
|
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."],[],[],null,["# TIntegral\n\npublic interface **TIntegral** \n\n|---|---|---|\n| Known Indirect Subclasses [TInt32](/jvm/api_docs/java/org/tensorflow/types/TInt32), [TInt64](/jvm/api_docs/java/org/tensorflow/types/TInt64), [TUint8](/jvm/api_docs/java/org/tensorflow/types/TUint8) |----------------------------------------------------------|-------------------------------------| | [TInt32](/jvm/api_docs/java/org/tensorflow/types/TInt32) | 32-bit signed integer tensor type. | | [TInt64](/jvm/api_docs/java/org/tensorflow/types/TInt64) | 64-bit signed integer tensor type. | | [TUint8](/jvm/api_docs/java/org/tensorflow/types/TUint8) | 8-bit unsigned integer tensor type. | |||\n\nCommon interface for all integral numeric tensors.\n\nOperations that only accepts integral values as some of their operands enforce that the tensor\ntypes for these operands to be bound to this interface.\n\n\u003cbr /\u003e\n\n### Inherited Methods\n\nFrom interface [org.tensorflow.types.family.TType](/jvm/api_docs/java/org/tensorflow/types/family/TType) \n\n|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [close](/jvm/api_docs/java/org/tensorflow/types/family/TType#close())() Release resources associated with the Tensor. |\n| abstract [DataType](/jvm/api_docs/java/org/tensorflow/proto/framework/DataType) | [dataType](/jvm/api_docs/java/org/tensorflow/types/family/TType#dataType())() Returns the [DataType](/jvm/api_docs/java/org/tensorflow/proto/framework/DataType) of elements stored in the tensor. |\n| abstract long | [numBytes](/jvm/api_docs/java/org/tensorflow/types/family/TType#numBytes())() Returns the size, in bytes, of the tensor data. |\n| abstract Class\\\u003c? extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e | [type](/jvm/api_docs/java/org/tensorflow/types/family/TType#type())() Returns the type of this tensor as a registered subclass of `TType` |\n\nFrom interface [org.tensorflow.Tensor](/jvm/api_docs/java/org/tensorflow/Tensor) \n\n|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [RawTensor](/jvm/api_docs/java/org/tensorflow/RawTensor) | [asRawTensor](/jvm/api_docs/java/org/tensorflow/Tensor#asRawTensor())() Returns a raw (untyped) representation of this tensor |\n| abstract void | [close](/jvm/api_docs/java/org/tensorflow/Tensor#close())() Release resources associated with the Tensor. |\n| abstract [DataType](/jvm/api_docs/java/org/tensorflow/proto/framework/DataType) | [dataType](/jvm/api_docs/java/org/tensorflow/Tensor#dataType())() Returns the [DataType](/jvm/api_docs/java/org/tensorflow/proto/framework/DataType) of elements stored in the tensor. |\n| abstract long | [numBytes](/jvm/api_docs/java/org/tensorflow/Tensor#numBytes())() Returns the size, in bytes, of the tensor data. |\n| abstract static \\\u003cT extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e T | [of](/jvm/api_docs/java/org/tensorflow/Tensor#of(java.lang.Class\u003cT\u003e, org.tensorflow.ndarray.Shape, long, java.util.function.Consumer\u003cT\u003e))(Class\\\u003cT\\\u003e type, [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) shape, long size, Consumer\\\u003cT\\\u003e dataInitializer) Allocates a tensor of a given datatype, shape and size. |\n| abstract static \\\u003cT extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e T | [of](/jvm/api_docs/java/org/tensorflow/Tensor#of(java.lang.Class\u003cT\u003e, org.tensorflow.ndarray.Shape))(Class\\\u003cT\\\u003e type, [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) shape) Allocates a tensor of a given datatype and shape. |\n| abstract static \\\u003cT extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e T | [of](/jvm/api_docs/java/org/tensorflow/Tensor#of(java.lang.Class\u003cT\u003e, org.tensorflow.ndarray.Shape, long))(Class\\\u003cT\\\u003e type, [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) shape, long size) Allocates a tensor of a given datatype, shape and size. |\n| abstract static \\\u003cT extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e T | [of](/jvm/api_docs/java/org/tensorflow/Tensor#of(java.lang.Class\u003cT\u003e, org.tensorflow.ndarray.Shape, java.util.function.Consumer\u003cT\u003e))(Class\\\u003cT\\\u003e type, [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) shape, Consumer\\\u003cT\\\u003e dataInitializer) Allocates and initialize a tensor of a given datatype and shape. |\n| abstract static \\\u003cT extends [TType](/jvm/api_docs/java/org/tensorflow/types/family/TType)\\\u003e T | [of](/jvm/api_docs/java/org/tensorflow/Tensor#of(java.lang.Class\u003cT\u003e, org.tensorflow.ndarray.Shape, org.tensorflow.ndarray.buffer.ByteDataBuffer))(Class\\\u003cT\\\u003e type, [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) shape, [ByteDataBuffer](/jvm/api_docs/java/org/tensorflow/ndarray/buffer/ByteDataBuffer) rawData) Creates a Tensor of any type from the raw data provided by the given buffer. |\n| abstract [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) | [shape](/jvm/api_docs/java/org/tensorflow/Tensor#shape())() Returns the shape of the tensor. |\n\nFrom interface [org.tensorflow.ndarray.Shaped](/jvm/api_docs/java/org/tensorflow/ndarray/Shaped) \n\n|-------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [rank](/jvm/api_docs/java/org/tensorflow/ndarray/Shaped#rank())() |\n| abstract [Shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shape) | [shape](/jvm/api_docs/java/org/tensorflow/ndarray/Shaped#shape())() |\n| abstract long | [size](/jvm/api_docs/java/org/tensorflow/ndarray/Shaped#size())() Computes and returns the total size of this container, in number of values. |\n\nFrom interface java.lang.AutoCloseable \n\n|---------------|---------|\n| abstract void | close() |"]]