Introducing Google AI Edge Portal: Benchmark Edge AI at scale. Sign-up to request access during private preview.

litert::Tensor

Summary

Inheritance

Inherits from: litert::internal::NonOwnedHandle< LiteRtTensor >

Constructors and Destructors

Tensor(LiteRtTensor tensor)

Public types

TensorUses using
absl::InlinedVector< TensorUse, kExpectedMaxNumOfTensorUses >

Public functions

DefiningOp() const
std::optional< LiteRtTensorDefiningOp >
ElementType() const
enum ElementType
HasQuantization() const
bool
HasWeights() const
bool
IsConstant() const
bool
IsSubgraphInput() const
bool
IsSubgraphOutput() const
bool
Name() const
absl::string_view
PerChannelQuantization() const
LiteRtQuantizationPerChannel
PerTensorQuantization() const
LiteRtQuantizationPerTensor
QTypeId() const
LiteRtQuantizationTypeId
RankedTensorType() const
TensorIndex() const
std::uint32_t
TypeId() const
LiteRtTensorTypeId
UnrankedTensorType() const
Expected< LiteRtUnrankedTensorType >
Uses() const
TensorUses
Weights() const
class Weights
WeightsData() const
Expected< absl::Span< const T > >

Structs

litert::Tensor::TensorUse

Public types

TensorUses

absl::InlinedVector< TensorUse, kExpectedMaxNumOfTensorUses > TensorUses

Public functions

DefiningOp

std::optional<LiteRtTensorDefiningOp > DefiningOp()const

ElementType

enumElementTypeElementType()const

HasQuantization

boolHasQuantization()const

HasWeights

boolHasWeights()const

IsConstant

boolIsConstant()const

IsSubgraphInput

boolIsSubgraphInput()const

IsSubgraphOutput

boolIsSubgraphOutput()const

Name

absl::string_viewName()const

PerChannelQuantization

LiteRtQuantizationPerChannelPerChannelQuantization()const

PerTensorQuantization

LiteRtQuantizationPerTensorPerTensorQuantization()const

QTypeId

LiteRtQuantizationTypeIdQTypeId()const

RankedTensorType

Expected<classRankedTensorType  > RankedTensorType()const

Tensor

 Tensor(
 LiteRtTensor tensor
)

TensorIndex

std::uint32_tTensorIndex()const

TypeId

LiteRtTensorTypeIdTypeId()const

UnrankedTensorType

Expected<LiteRtUnrankedTensorType > UnrankedTensorType()const

Uses

TensorUsesUses()const

Weights

classWeights Weights()const

WeightsData

Expected<absl::Span<constT > > WeightsData()const

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 2025年05月14日 UTC.