'tfl' گویش

گویش TensorFlow Lite.

این گویش با عملیات TensorFlow Lite نگاشت می شود.

متغیرها:

  • همه مقادیر از نوع Tensor هستند (به ویژه، اسکالرها با استفاده از تانسورهای صفر بعدی نشان داده می شوند).

عملیات

tfl.abs (TFL::AbsOp)

عملگر مقدار مطلق

با توجه به یک تانسور x ، این عملیات یک تانسور حاوی مقدار مطلق هر عنصر در x را برمی‌گرداند. برای مثال، اگر x یک عنصر ورودی و y یک عنصر خروجی باشد، این عملیات \(y = |x|\)را محاسبه می‌کند.

صفات: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
x تانسور عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا 32 بیتی شناور یا نوع QI8 یا نوع QI16

نتایج:

نتیجه شرح
y تانسور عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا 32 بیتی شناور یا نوع QI8 یا نوع QI16

tfl.add (TFL::AddOp)

اپراتور اضافه

عملیات جمع عنصر.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , Commutative , QuantizableResult , ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است

عملگرها:

عملوند شرح
lhs تانسور 32 بیتی شناور یا مقادیر صحیح بدون علامت 16 بیتی یا اعداد صحیح بدون علامت 32 بیتی یا اعداد صحیح بدون علامت 64 بیتی یا QI8 یا QUI8 یا QI16
rhs تانسور 32 بیتی شناور یا مقادیر صحیح بدون علامت 16 بیتی یا اعداد صحیح بدون علامت 32 بیتی یا اعداد صحیح بدون علامت 64 بیتی یا QI8 یا QUI8 یا QI16

نتایج:

نتیجه شرح
output تانسور 32 بیتی شناور یا مقادیر صحیح بدون علامت 16 بیتی یا اعداد صحیح بدون علامت 32 بیتی یا اعداد صحیح بدون علامت 64 بیتی یا QI8 یا QUI8 یا QI16

tfl.add_n (TFL::AddNOp)

_افزودن n عملگر

همه تانسورهای ورودی را از نظر عنصر اضافه می کند.

صفات: AlwaysSpeculatableImplTrait , Commutative

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
inputs متغیر تانسور از هر نوع مقدار

نتایج:

نتیجه شرح
sum تانسور مقادیر 32 بیتی شناور یا 32 بیتی مقادیر صحیح بدون علامت

tfl.arg_max (TFL::ArgMaxOp)

اپراتور ArgMax

شاخصی را با بیشترین مقدار در ابعاد یک تانسور برمی‌گرداند.

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
output_type ::mlir::ویژگی صفت مشتق شده

عملگرها:

عملوند شرح
input تانسور عدد صحیح بدون علامت 1 بیتی یا مقادیر شناور 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا نوع QUI8
dim تانسور مقادیر صحیح بدون علامت 32/64 بیتی

نتایج:

نتیجه شرح
output تانسور مقادیر صحیح بدون علامت 32/64 بیتی

tfl.arg_min (TFL::ArgMinOp)

اپراتور ArgMin

شاخصی را با کمترین مقدار در ابعاد یک تانسور برمی‌گرداند. a = [1، 10، 26.9، 2.8، 166.32، 62.3] b = tf.math.argmin(input = a) c = tf.keras.backend.eval(b)

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
output_type ::mlir::ویژگی صفت مشتق شده

عملگرها:

عملوند شرح
input تانسور عدد صحیح بدون علامت 1 بیتی یا مقادیر شناور 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا نوع QUI8
dim تانسور مقادیر صحیح بدون علامت 32/64 بیتی

نتایج:

نتیجه شرح
output تانسور مقادیر صحیح بدون علامت 32/64 بیتی

tfl.assign_variable (TFL::AssignVariableOp)

مقدار جدیدی را به یک متغیر اختصاص می دهد.

هر ReadVariableOp با وابستگی کنترلی به این عملیات تضمینی برای برگرداندن این مقدار یا مقدار جدیدتر بعدی متغیر است.

رابط ها: TflRuntimeVerifyOpInterface

عملگرها:

عملوند شرح
resource_id تانسور مقادیر منابع
value تانسور شناور 32 بیتی یا شناور 64 بیتی یا عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا نوع QUI8 یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا نوع QI16 یا نوع پیچیده با عناصر شناور 32 بیتی یا نوع پیچیده با مقادیر عناصر شناور 64 بیتی

tfl.atan2 (TFL::Atan2Op)

عملیات Atan2

عملیات "atan2" با رعایت نشانه‌های آرگومان‌ها، تانژانت y/x را از نظر عنصر محاسبه می‌کند.

صفات: AlwaysSpeculatableImplTrait ، SameOperandsAndResultElementType ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
y تانسور مقادیر شناور 32 بیتی یا شناور 64 بیتی
x تانسور مقادیر شناور 32 بیتی یا شناور 64 بیتی

نتایج:

نتیجه شرح
output تانسور مقادیر شناور 32 بیتی یا شناور 64 بیتی

tfl.average_pool_2d (TFL::AveragePool2DOp)

اپراتور _Average_pool 2d

عملیات ادغام متوسط ​​را روی ورودی انجام می دهد.

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
filter_height ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
filter_width ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
padding ::mlir::StringAttr ویژگی رشته ای که مقدار آن SAME یا VALID است
stride_h ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_w ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است

عملگرها:

عملوند شرح
input تانسور 32 بیتی float یا QI8 یا QUI8 یا QI16

نتایج:

نتیجه شرح
output تانسور 32 بیتی float یا QI8 یا QUI8 یا QI16

tfl.basic_lstm (TFL::BasicLSTMOp)

اپراتور اصلی lstm

اپراتور سلولی پایه LSTM.

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است
cell_clip ::mlir::FloatAttr ویژگی float 32 بیتی که مقدار آن غیر منفی است
proj_clip ::mlir::FloatAttr ویژگی float 32 بیتی که مقدار آن غیر منفی است
kernel_type ::mlir::TFL::LSTMKernelTypeAttr lstm_kernel_type که مقدار آن mlir::TFL::LSTMKernelType::BASIC است

عملگرها:

عملوند شرح
data_input تانسور مقادیر 32 بیتی شناور یا QUI8 نوع
prev_activ_input تانسور مقادیر 32 بیتی شناور یا QUI8 نوع
weights_input تانسور مقادیر 32 بیتی شناور یا QUI8 نوع
biases_input تانسور 32 بیتی float یا مقادیر نوع QI32
prev_state_input تانسور 32 بیتی float یا مقادیر نوع QI16

نتایج:

نتیجه شرح
activ_output تانسور دوبعدی از هر نوع مقدار
state_output تانسور دوبعدی از هر نوع مقدار
concat_temp تانسور دوبعدی از هر نوع مقدار
activ_temp تانسور دوبعدی از هر نوع مقدار

tfl.batch_matmul (TFL::BatchMatMulOp)

عملگر ضرب ماتریس دسته ای

ضرب ماتریس دسته ای را روی ورودی ها انجام می دهد. از قراردادهای TensorFlow BatchMatMulV2 پیروی می کند، با پشتیبانی از ابعاد ناشناخته در ابعاد دسته ای و پخش.

Inputs:
  `inputs[0]`: required: input LHS
  `inputs[1]`: required: input RHS
  `adjoint_lhs`: optional: Transpose LHS (default false)
  `adjoint_lhs`: optional: Transpose LHS (default false)

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، DynamicRangeQuantizedOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
adj_x ::mlir::BoolAttr ویژگی bool
adj_y ::mlir::BoolAttr ویژگی bool
asymmetric_quantize_inputs ::mlir::BoolAttr ویژگی bool

عملگرها:

عملوند شرح
x تانسور 32 بیتی شناور یا QI8 نوع یا QI16 یا مقادیر صحیح بدون علامت 8 بیتی
y تانسور 32 بیتی شناور یا QI8 نوع یا QI16 یا مقادیر صحیح بدون علامت 8 بیتی

نتایج:

نتیجه شرح
output تانسور 32 بیتی شناور یا QI8 نوع یا QI16 یا مقادیر صحیح بدون علامت 32 بیتی

tfl.batch_to_space_nd (TFL::BatchToSpaceNdOp)

اپراتور BatchToSpaceNd

این عملیات بعد "دسته ای" 0 را به ابعاد فضایی تغییر می دهد.

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا نوع QUI8 یا نوع QI16
block_shape تانسور مقادیر صحیح بدون علامت 32 بیتی
indices تانسور مقادیر صحیح بدون علامت 32 بیتی

نتایج:

نتیجه شرح
output تانسور 32 بیتی شناور یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا عدد صحیح بدون علامت 8 بیتی یا QI8 یا نوع QUI8 یا QI16

tfl.bidirectional_sequence_lstm (TFL::BidirectionalSequenceLSTMOp)

عملگر lstm دنباله دو طرفه

lstm دو ​​جهته اساساً دو lstm است، یکی در حال اجرا به جلو و دیگری در حال اجرا به عقب. و خروجی الحاق دو lstms است.

صفات: QuantizableResult

رابط ها: DynamicRangeQuantizedOpInterface ، TFL_StatefulOp ، TflRuntimeVerifyOpInterface

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است
cell_clip ::mlir::FloatAttr ویژگی float 32 بیتی که مقدار آن غیر منفی است
proj_clip ::mlir::FloatAttr ویژگی float 32 بیتی که مقدار آن غیر منفی است
merge_outputs ::mlir::BoolAttr ویژگی bool
time_major ::mlir::BoolAttr ویژگی bool
asymmetric_quantize_inputs ::mlir::BoolAttr ویژگی bool

عملگرها:

عملوند شرح
input تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_input_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_input_to_forget_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_input_to_cell_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_input_to_output_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_recurrent_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_recurrent_to_forget_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_recurrent_to_cell_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_recurrent_to_output_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
fw_cell_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_cell_to_forget_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_cell_to_output_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_input_gate_bias تانسور از هر نوع مقدار یا هیچ نوع
fw_forget_gate_bias تانسور مقادیر شناور 32 بیتی
fw_cell_bias تانسور مقادیر شناور 32 بیتی
fw_output_gate_bias تانسور مقادیر شناور 32 بیتی
fw_projection_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_projection_bias تانسور از هر نوع مقدار یا هیچ نوع
bw_input_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_input_to_forget_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
bw_input_to_cell_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
bw_input_to_output_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
bw_recurrent_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_recurrent_to_forget_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
bw_recurrent_to_cell_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
bw_recurrent_to_output_weights تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت
bw_cell_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_cell_to_forget_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_cell_to_output_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_input_gate_bias تانسور از هر نوع مقدار یا هیچ نوع
bw_forget_gate_bias تانسور مقادیر شناور 32 بیتی
bw_cell_bias تانسور مقادیر شناور 32 بیتی
bw_output_gate_bias تانسور مقادیر شناور 32 بیتی
bw_projection_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_projection_bias تانسور از هر نوع مقدار یا هیچ نوع
fw_input_activation_state تانسور حالت دار
fw_input_cell_state تانسور حالت دار
bw_input_activation_state تانسور حالت دار
bw_input_cell_state تانسور حالت دار
aux_input تانسور از هر نوع مقدار یا هیچ نوع
fw_aux_input_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_aux_input_to_forget_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_aux_input_to_cell_weights تانسور از هر نوع مقدار یا هیچ نوع
fw_aux_input_to_output_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_aux_input_to_input_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_aux_input_to_forget_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_aux_input_to_cell_weights تانسور از هر نوع مقدار یا هیچ نوع
bw_aux_input_to_output_weights تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
fw_output تانسور از هر نوع مقدار
bw_output تانسور از هر نوع مقدار

tfl.bitcast (TFL::BitcastOp)

اپراتور بیت کست

یک تانسور را از یک نوع به نوع دیگر Bitcast می کند.

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور از هر نوع مقدار

نتایج:

نتیجه شرح
output تانسور از هر نوع مقدار

tfl.bitwise_xor (TFL::BitwiseXorOp)

عملگر بیتی Xor

Elementwise XOR بیتی lhs و rhs را محاسبه می‌کند.

صفات: AlwaysSpeculatableImplTrait , Commutative , SameOperandsAndResultElementType

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
lhs تانسور عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 32 بیتی
rhs تانسور عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 32 بیتی

نتایج:

نتیجه شرح
output تانسور عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 32 بیتی

tfl.broadcast_args (TFL::BroadcastArgsOp)

شکل s0 op s1 را با پخش برگردانید.

با توجه به s0 و s1 ، تانسورهایی که اشکال را نشان می دهند، r0 ، شکل پخش شده را محاسبه می کنند. s0 ، s1 و r0 همگی بردارهای عدد صحیح هستند.

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
s0 تانسور مقادیر صحیح بدون علامت 32/64 بیتی
s1 تانسور مقادیر صحیح بدون علامت 32/64 بیتی

نتایج:

نتیجه شرح
r0 تانسور مقادیر صحیح بدون علامت 32/64 بیتی

tfl.broadcast_to (TFL::BroadcastToOp)

پخش یک آرایه برای یک شکل سازگار.

پخش فرآیند ساخت آرایه هایی است که دارای اشکال سازگار برای عملیات حسابی باشند. دو شکل با هم سازگار هستند اگر برای هر جفت بعد یا مساوی باشند یا یکی از آنها یکی باشد. هنگامی که می خواهید یک Tensor را به یک شکل پخش کنید، از ابعاد انتهایی شروع می شود و به سمت جلو حرکت می کند.

مثلا،

x = tf.constant([1, 2, 3]) y = tf.broadcast_to(x, [3, 3]) print(y) tf.Tensor( [[1 2 3] [1 2 3] [1 2] 3]]، shape=(3، 3)، dtype=int32)

در مثال بالا، تانسور ورودی با شکل [1, 3] به تانسور خروجی با شکل [3, 3] پخش می شود.

هنگام انجام عملیات پخش شده مانند ضرب یک تانسور در یک اسکالر، پخش (معمولاً) مقداری مزیت زمانی یا مکانی را به همراه دارد، زیرا تانسور پخش شده هرگز محقق نمی شود.

با این حال، broadcast_to چنین مزایایی را به همراه ندارد. تانسور تازه ایجاد شده حافظه کامل شکل پخش شده را می گیرد. (در یک زمینه گراف، broadcast_to ممکن است با عملیات بعدی ترکیب شود و سپس بهینه شود.)

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور 32 بیتی شناور یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 4 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا نوع QUI8 یا 16 عدد صحیح بدون علامت بیتی یا نوع QI16 یا عدد صحیح بدون علامت 64 بیتی یا نوع پیچیده با مقادیر عناصر شناور 32 بیتی
shape تانسور مقادیر صحیح بدون علامت 32/64 بیتی

نتایج:

نتیجه شرح
output تانسور 32 بیتی شناور یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 4 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا نوع QUI8 یا 16 عدد صحیح بدون علامت بیتی یا نوع QI16 یا عدد صحیح بدون علامت 64 بیتی یا نوع پیچیده با مقادیر عناصر شناور 32 بیتی

tfl.bucketize (TFL::BucketizeOp)

"ورودی" را بر اساس "مرزها" سطل می کند.

مثال:

اگر ورودی ها boundaries = [0, 10, 100] و input = [[-5, 10000][150, 10][5, 100]] ، آنگاه خروجی output = [[0, 3][3, 2][1, 3]] خواهد بود. output = [[0, 3][3, 2][1, 3]] .

صفات: AlwaysSpeculatableImplTrait , SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
boundaries ::mlir::ArrayAttr ویژگی آرایه شناور 32 بیتی

عملگرها:

عملوند شرح
input تانسور مقادیر 32 بیتی شناور یا شناور 64 بیتی یا اعداد صحیح بدون علامت 32 بیتی یا 64 بیتی مقادیر صحیح

نتایج:

نتیجه شرح
output تانسور مقادیر صحیح بدون علامت 32 بیتی

tfl.call_once (TFL::CallOnceOp)

یک تابع مقداردهی اولیه را فراخوانی می کند

این عملیات تابع مقداردهی اولیه را برای جلسه اولیه در گویش مدل ذخیره شده tf فراخوانی می کند.

رابط ها: TflRuntimeVerifyOpInterface

ویژگی های:

صفت نوع MLIR شرح
session_init_function ::mlir::StringAttr ویژگی رشته

tfl.cast (TFL::CastOp)

اپراتور بازیگران

ورودی را از نوع ورودی به نوع خروجی ارسال می کند.

صفات: AlwaysSpeculatableImplTrait , SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور از نوع شناور 16 بیتی یا bfloat16 یا شناور 32 بیتی یا 64 بیتی شناور یا عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 4 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا نوع quint8 TFLite یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت یا نوع پیچیده 8 بیتی با مقادیر عناصر شناور 32 بیتی

نتایج:

نتیجه شرح
output تانسور از نوع شناور 16 بیتی یا bfloat16 یا شناور 32 بیتی یا 64 بیتی شناور یا عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا نوع quint8 TFLite یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع پیچیده با مقادیر عناصر شناور 32 بیتی

tfl.ceil (TFL::CeilOp)

اپراتور سقفی

مقدار سقف ورودی از نظر عنصر را برمی‌گرداند.

صفات: AlwaysSpeculatableImplTrait ، InferTensorType ، TF::SameOperandsAndResultTypeResolveRef

رابط ها: ConditionallySpeculatable ، InferShapedTypeOpInterface ، InferTypeOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
x تانسور مقادیر شناور 32 بیتی

نتایج:

نتیجه شرح
y تانسور مقادیر شناور 32 بیتی

tfl.complex_abs (TFL::ComplexAbsOp)

قدر مطلق مختلط یک تانسور را محاسبه می کند.

با توجه به تانسور x از اعداد مختلط، این عملیات یک تانسور از نوع float یا double را برمی‌گرداند که قدر مطلق هر عنصر در x است. همه عناصر در x باید اعداد مختلط شکل \(a + bj\)باشند. مقدار مطلق به عنوان \( \sqrt{a^2 + b^2}\)محاسبه می شود.

صفات: AlwaysSpeculatableImplTrait , SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور از نوع مختلط با عناصر شناور 32 بیتی یا نوع پیچیده با مقادیر عناصر شناور 64 بیتی

نتایج:

نتیجه شرح
output تانسور مقادیر شناور 32 بیتی یا شناور 64 بیتی

tfl.concatenation (TFL::ConcatenationOp)

عملگر الحاق

تانسورها را در یک بعد به هم متصل می کند

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
axis ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است

عملگرها:

عملوند شرح
values متغیر تانسور از هر نوع مقدار

نتایج:

نتیجه شرح
output تانسور 32 بیتی شناور یا عدد صحیح بدون علامت 64 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 8 بیتی یا نوع QI8 یا نوع QUI8 یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا 1 مقادیر عدد صحیح بدون علامت بیت

tfl.control_node (TFL::ControlNodeOp)

عملیات TFL.control_node عملیات تک بلوکی را به منظور اتصال لبه‌های کنترلی می‌پیچد.

این برای بسته بندی مناطق و اتصال وابستگی های کنترلی به آنها استفاده می شود. معمولاً، این اتفاق در یکی از آخرین مراحل قبل از انتشار مدل flatbuffer رخ می‌دهد تا بهینه‌سازی‌هایی که به ترتیب ثابتی از عملیات متکی هستند (مانند مواد مجدد) را فعال کند. به طوری که هرگونه ترتیب مجدد زمان اجرا به ترتیب داده شده توسط وابستگی های کنترلی احترام می گذارد.

ویژگی ها: HasParent<mlir::func::FuncOp> ، RecursiveMemoryEffects ، SingleBlockImplicitTerminator<YieldOp> ، SingleBlock

عملگرها:

عملوند شرح
controlInputs متغیر کنترل

نتایج:

نتیجه شرح
outputs متغیر تانسور از هر نوع مقدار
control کنترل

tfl.conv_2d (TFL::Conv2DOp)

عملگر پیچیدگی

عملیات کانولوشن را روی ورودی ها انجام می دهد.

ورودی‌ها: inputs[0] : مورد نیاز: inputs[1] : لازم: inputs[2] : اختیاری: تانسور بایاس

صفات: AlwaysSpeculatableImplTrait , QuantizableResult , quant::AccumulatorUniformScale<2, 0, 1> , quant::AffineOpCoefficient<0, 1>

رابط‌ها: AffineQuantizedOpInterface ، ConditionallySpeculatable ، DynamicRangeQuantizedOpInterface ، InferTypeOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TFL_SparseOp ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface .

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
dilation_h_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
dilation_w_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است
padding ::mlir::StringAttr ویژگی رشته ای که مقدار آن SAME یا VALID است
stride_h ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_w ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی

عملگرها:

عملوند شرح
input تانسور 32 بیتی float یا QI8 یا QUI8 یا QI16
filter تانسور 32 بیتی float یا QI4 یا QI8 یا QUI8
bias تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
output تانسور 32 بیتی float یا QI8 یا QUI8 یا QI16

tfl.conv_3d (TFL::Conv3DOp)

اپراتور Convolution 3D

عملیات کانولوشن را روی ورودی های سه بعدی انجام می دهد. ورودی‌ها: inputs[0] : مورد نیاز: inputs[1] : لازم: inputs[2] : اختیاری: تانسور بایاس

صفات: AlwaysSpeculatableImplTrait ، quant::AccumulatorUniformScale<2, 0, 1>

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
dilation_d_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
dilation_h_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
dilation_w_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است
padding ::mlir::StringAttr ویژگی رشته ای که مقدار آن SAME یا VALID است
stride_d ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_h ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_w ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی

عملگرها:

عملوند شرح
input تانسور مقادیر شناور 32 بیتی
filter تانسور مقادیر شناور 32 بیتی
bias تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
output تانسور مقادیر شناور 32 بیتی

tfl.conv_3d_transpose (TFL::Conv3DTransposeOp)

عملگر 3 بعدی پیچیدگی انتقال یافته

عملیات کانولوشن انتقالی را روی ورودی های سه بعدی انجام می دهد. ورودی‌ها: inputs[0] : مورد نیاز: شکل inputs[1] : مورد نیاز: inputs[2] : لازم: inputs[3] : اختیاری: تانسور بایاس

صفات: AlwaysSpeculatableImplTrait ، quant::AccumulatorUniformScale<2, 0, 1>

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
dilation_d_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
dilation_h_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
dilation_w_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است
padding ::mlir::StringAttr ویژگی رشته ای که مقدار آن SAME یا VALID است
stride_d ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_h ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_w ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی

عملگرها:

عملوند شرح
output_shape تانسور مقادیر صحیح بدون علامت 32 بیتی
filter تانسور مقادیر شناور 32 بیتی
input تانسور مقادیر شناور 32 بیتی
bias تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
output تانسور مقادیر شناور 32 بیتی

tfl.cos (TFL::CosOp)

عملگر کسینوس

کسینوس ورودی را از نظر عنصر محاسبه می کند

صفات: AlwaysSpeculatableImplTrait ، InferTensorType ، TF::SameOperandsAndResultTypeResolveRef

رابط ها: ConditionallySpeculatable ، InferShapedTypeOpInterface ، InferTypeOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
x تانسور مقادیر شناور 32 بیتی

نتایج:

نتیجه شرح
y تانسور مقادیر شناور 32 بیتی

tfl.cumsum (TFL::CumsumOp)

عملگر Cumsum

مجموع تجمعی تانسور x را در امتداد محور محاسبه کنید.

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
exclusive ::mlir::BoolAttr ویژگی bool
reverse ::mlir::BoolAttr ویژگی bool

عملگرها:

عملوند شرح
input تانسور مقادیر 32 بیتی شناور یا اعداد صحیح بدون علامت 32 بیتی یا 64 بیتی مقادیر صحیح
axis تانسور مقادیر صحیح بدون علامت 32 بیتی

نتایج:

نتیجه شرح
output تانسور مقادیر 32 بیتی شناور یا اعداد صحیح بدون علامت 32 بیتی یا 64 بیتی مقادیر صحیح

tfl.custom (TFL::CustomOp)

عملیات سفارشی

یک عملیات عمومی برای هر عملیات سفارشی TFLite.

input: فهرستی از ورودی ها در عملیات اصلی. custom_code: رشته ای است که برای تشخیص اینکه دقیقاً این op چیست، که با operator_codes.custom_code در flatbuffer مطابقت دارد استفاده می شود. custom_option: نگهدارنده ای برای ذخیره ویژگی های op به صورت بایت. خروجی: فهرستی از خروجی ها در عملیات اصلی.

رابط ها: TflRuntimeVerifyOpInterface

ویژگی های:

صفت نوع MLIR شرح
custom_code ::mlir::StringAttr ویژگی رشته
custom_option ::mlir::TFL::ConstBytesAttr نمایش ویژگی رشته ای از بایت های کامپایل شده

عملگرها:

عملوند شرح
input متغیر تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
output متغیر تانسور از هر نوع مقدار

tfl.custom_tf (TFL::CustomTfOp)

Wrapper Op برای عملیات سفارشی TF.

یک عملیات بسته بندی در اطراف هر عملیات سفارشی TF. این شامل عملیات‌هایی است که با استفاده از custom_opdefs تعریف شده‌اند یا پیوند داده شده‌اند که در گویش TF تعریف نشده‌اند. این Op فقط عملیات سفارشی را در یک منطقه پیچیده می کند. توجه شماره 1، این عملیات شامل عملیات سفارشی TF Lite نخواهد بود که با استفاده از CustomOp تعریف شده است. توجه شماره 2، این عملیات فقط نمایش داخلی در داخل مبدل است و هنگامی که مدل به Flatbuffer صادر می‌شود، در معرض/اکسپورت نمی‌شود.

صفات: IsolatedFromAbove ، RecursiveMemoryEffects ، SingleBlockImplicitTerminator<YieldOp> ، SingleBlock

رابط ها: InferTypeOpInterface ، TflRuntimeVerifyOpInterface

عملگرها:

عملوند شرح
input متغیر تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
output متغیر تانسور از هر نوع مقدار

tfl.densify (TFL::DensifyOp)

عملگر متراکم کردن

تانسور پراکنده را به فرمت متراکم تبدیل می کند.

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت

نتایج:

نتیجه شرح
output تانسور مقادیر 32 بیتی شناور یا 8 بیتی مقادیر صحیح بدون علامت

tfl.depth_to_space (TFL::DepthToSpaceOp)

اپراتور DepthToSpace

داده ها را از عمق به بلوک های داده های مکانی بازآرایی می کند. این تبدیل معکوس SpaceToDepth است. به طور خاص، این عملیات یک کپی از تانسور ورودی را خروجی می‌دهد که در آن مقادیر از بعد depth در بلوک‌های فضایی به ابعاد height و width منتقل می‌شوند. attr block_size اندازه بلوک ورودی و نحوه انتقال داده ها را نشان می دهد.

صفات: AlwaysSpeculatableImplTrait , QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
block_size ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی که مقدار آن مثبت است

عملگرها:

عملوند شرح
input تانسور 32 بیتی شناور یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا TFLite از نوع quint8 یا 8 بیتی بدون علامت صحیح یا QI8 یا نوع QUI8

نتایج:

نتیجه شرح
output تانسور 32 بیتی شناور یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا TFLite از نوع quint8 یا 8 بیتی بدون علامت صحیح یا QI8 یا نوع QUI8

tfl.depthwise_conv_2d (TFL::DepthwiseConv2DOp)

عملگر پیچیدگی قابل جداسازی عمقی

عملیات کانولوشن را روی ورودی ها انجام می دهد.

ورودی‌ها: inputs[0] : مورد نیاز: inputs[1] : لازم: inputs[2] : اختیاری: تانسور بایاس

صفات: AlwaysSpeculatableImplTrait , QuantizableResult , quant::AccumulatorUniformScale<2, 0, 1> , quant::AffineOpCoefficient<3, 1>

رابط ها: AffineQuantizedOpInterface ، ConditionallySpeculatable ، DynamicRangeQuantizedOpInterface TflRuntimeVerifyOpInterface NoMemoryEffect (MemoryEffectOpInterface) ، TFL_SparseOp ، TflArithmeticCountOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
dilation_h_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
dilation_w_factor ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است
padding ::mlir::StringAttr ویژگی رشته ای که مقدار آن SAME یا VALID است
stride_h ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
stride_w ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی
depth_multiplier ::mlir::IntegerAttr ویژگی عدد صحیح بدون علامت 32 بیتی

عملگرها:

عملوند شرح
input تانسور 32 بیتی float یا QI8 یا QUI8 یا QI16
filter تانسور 32 بیتی float یا QI4 یا QI8 یا QUI8
bias تانسور از هر نوع مقدار یا هیچ نوع

نتایج:

نتیجه شرح
output تانسور 32 بیتی float یا QI8 یا QUI8 یا QI16

tfl.dequantize (TFL::DequantizeOp)

اپراتور Dequantize

آرایه کوانتیزه شده از اعداد صحیح را با توجه به پارامترهای کوانتیزاسیون به نقاط شناور تبدیل می کند.

رابط ها: NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور از نوع QI4 یا نوع QI8 یا نوع QUI8 یا نوع QI16 یا مقادیر شناور 16 بیتی

نتایج:

نتیجه شرح
output تانسور مقادیر شناور 32 بیتی

tfl.dilate (TFL::DilateOp)

اپراتور اتساع

یک تانسور را با افزودن عناصر جدید بین عناصر موجود گسترش می دهد. صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
input تانسور عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا مقادیر شناور ۳۲ بیتی یا شناور ۶۴ بیتی
dilations تانسور مقادیر صحیح بدون علامت 32 بیتی
padding_value تانسور 0D از هر نوع مقدار

نتایج:

نتیجه شرح
output تانسور عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 16 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا مقادیر شناور ۳۲ بیتی یا شناور ۶۴ بیتی

tfl.div (TFL::DivOp)

اپراتور بخش

عملیات تقسیم عنصری.

ویژگی ها: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function ::mlir::StringAttr ویژگی رشته ای که مقدار آن NONE، یا RELU، یا RELU_N1_TO_1، یا RELU6، یا TANH، یا SIGN_BIT است

عملگرها:

عملوند شرح
lhs تانسور مقادیر شناور 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا QUI8
rhs تانسور مقادیر شناور 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا QUI8

نتایج:

نتیجه شرح
output تانسور مقادیر شناور 32 بیتی یا عدد صحیح بدون علامت 32 بیتی یا QUI8

tfl.dynamic_update_slice (TFL::DynamicUpdateSliceOp)

DynamicUpdateSlice.

عملیات DynamicUpdateSlice که معنایی مشابه با XLA DynamicUpdateSlice دارند. نتیجه ای را ایجاد می کند که مقدار عملوند آرایه ورودی است، با یک به روز رسانی تکه ای که در start_indices بازنویسی می شود.

به https://www.tensorflow.org/xla/operation_semantics#dynamicupdateslice مراجعه کنید

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

جلوه ها: MemoryEffects::Effect{}

عملگرها:

عملوند شرح
operand تانسور عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا مقادیر شناور 32 بیتی
update تانسور عدد صحیح بدون علامت 1 بیتی یا عدد صحیح بدون علامت 8 بیتی یا عدد صحیح بدون علامت 32 بیتی یا عدد صحیح بدون علامت 64 بیتی یا مقادیر شناور 32 بیتی
start_indices تانسور مقادیر صحیح بدون علامت 32 بیتی

نتایج:

نتیجه شرح
output تانسور عدد صحیح 1 بیتی یا عدد صحیح 8 بیتی یا عدد صحیح 32 بیتی بدون امضا یا عدد صحیح 64 بیتی یا مقادیر شناور 32 بیتی

tfl.elu (tfl :: eluop)

اپراتور واحد خطی نمایی

خطی خطی f (x) -> exp (x) -1 را برای x <0 ، x برای x> = 0. محاسبه می کند.

صفات: AlwaysSpeculatableImplTrait ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
x تانسور از مقادیر عدد صحیح 32 بیتی یا 8 بیتی بدون امضا

نتایج:

نتیجه شرح
y تانسور از مقادیر عدد صحیح 32 بیتی یا 8 بیتی بدون امضا

tfl.embedding_lookup (tfl :: تعبیه شده

تعبیه کردن اپراتور جستجو

در لیستی از تنش های جاسازی شده ، شناسه ها را جستجو می کند.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، DynamicRangeQuantizedOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lookup تانسور از مقادیر عدد صحیح 32 بیتی
value تانسور از شناور 32 بیتی یا عدد عدد صحیح بدون امضا یا مقادیر عدد صحیح 8 بیتی بدون امضا

نتایج:

نتیجه شرح
output تانسور از شناور 32 بیتی یا عدد عدد صحیح بدون امضا یا مقادیر عدد صحیح 8 بیتی بدون امضا

tfl.equal (tfl :: برابر)

اپراتور برابر

عنصر حقیقت x == y عنصر عاقلانه را برمی گرداند

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، Commutative ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
x تانسور عدد صحیح 1 بیتی بدون امضا یا شناور 32 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا یا 64 بیتی یا نوع Qi8 یا نوع qui8 یا عدد صحیح 8 بیتی بدون امضا یا مقادیر نوع رشته tflite
y تانسور عدد صحیح 1 بیتی بدون امضا یا شناور 32 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا یا 64 بیتی یا نوع Qi8 یا نوع qui8 یا عدد صحیح 8 بیتی بدون امضا یا مقادیر نوع رشته tflite

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.exp (tfl :: expop)

اپراتور نمایندگی طبیعی

عملیات نمایندگی طبیعی عناصر عاقلانه را بر روی ورودی انجام می دهد.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
x تانسور از مقادیر شناور 32 بیتی یا نوع Qi8 یا نوع QI16

نتایج:

نتیجه شرح
y تانسور از مقادیر شناور 32 بیتی یا نوع Qi8 یا نوع QI16

tfl.expand_dims (tfl :: expanddimsop)

ابعاد 1 را به شکل تانسور وارد می کند.

با توجه به input تانسور ، این عمل ابعاد 1 را در axis شاخص ابعاد شکل input وارد می کند. axis شاخص ابعاد از صفر شروع می شود. اگر یک عدد منفی را برای axis مشخص کنید ، از انتها به عقب محاسبه می شود.

اگر می خواهید بعد دسته ای را به یک عنصر واحد اضافه کنید ، این عمل مفید است. به عنوان مثال ، اگر یک تصویر واحد از شکل [height, width, channels] دارید ، می توانید آن را به یک دسته از 1 تصویر با expand_dims(image, 0) تبدیل کنید ، که شکل [1, height, width, channels] ایجاد می کند. .

نمونه های دیگر:

# 't' is a tensor of shape [2]
shape(expand_dims(t, 0)) ==> [1, 2]
shape(expand_dims(t, 1)) ==> [2, 1]
shape(expand_dims(t, -1)) ==> [2, 1]

# 't2' is a tensor of shape [2, 3, 5]
shape(expand_dims(t2, 0)) ==> [1, 2, 3, 5]
shape(expand_dims(t2, 2)) ==> [2, 3, 1, 5]
shape(expand_dims(t2, 3)) ==> [2, 3, 5, 1]

این عملیات مستلزم آن است:

-1-input.dims() <= dim <= input.dims()

این عملیات مربوط به squeeze() است که ابعاد اندازه 1 را از بین می برد.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
input تانسور از هر نوع مقادیر
dim تانسور از مقادیر عدد صحیح بدون امضا 32/64 بیتی

نتایج:

نتیجه شرح
output تانسور از هر نوع مقادیر

tfl.external_const (tfl :: externalconstop)

const op خارجی.

External Const OP دارای یک buffer_index است که به ثابت در مسطح نشان می دهد.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
buffer_index :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا

نتایج:

نتیجه شرح
output تانسور از هر نوع مقادیر

tfl.fake_quant (tfl :: fakequantop)

اپراتور جعلی

تقلبی را با استفاده از تانسور "ورودی" از نوع شناور از طریق Scalars Float Min و Max به "خروجی" از تانسور به شکل همان ورودی ها.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
min :: mlir :: floatattr ویژگی شناور 32 بیتی
max :: mlir :: floatattr ویژگی شناور 32 بیتی
num_bits :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی که حداقل مقدار آن 2 است که حداکثر مقدار آن 16 است
narrow_range :: mlir :: boolattr ویژگی بول که مقدار آن نادرست است

عملیات:

عملوند شرح
input تانسور از مقادیر شناور 32 بیتی

نتایج:

نتیجه شرح
output تانسور از مقادیر شناور 32 بیتی

tfl.fill (tfl :: fillop)

تانسور را با مقدار داده شده پر کنید.

تانسور را با مقدار داده شده پر کنید.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
dims تانسور از مقادیر عدد صحیح بدون امضا 32/64 بیتی
input تانسور شناور 32 بیتی یا شناور 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 64 بیتی یا عدد صحیح بدون امضا یا 1 بیتی یا نوع Qi8 یا نوع Qi16 یا مقادیر نوع رشته Tflite

نتایج:

نتیجه شرح
result تانسور شناور 32 بیتی یا شناور 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 64 بیتی یا عدد صحیح بدون امضا یا 1 بیتی یا نوع Qi8 یا نوع Qi16 یا مقادیر نوع رشته Tflite

tfl.floor (tfl :: flostop)

عملگر

مقدار کف عناصر ورودی ورودی را برمی گرداند.

صفات: AlwaysSpeculatableImplTrait ، InferTensorType ، TF::SameOperandsAndResultTypeResolveRef

رابط ها: ConditionallySpeculatable ، InferShapedTypeOpInterface ، InferTypeOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
x تانسور از مقادیر شناور 32 بیتی

نتایج:

نتیجه شرح
y تانسور از مقادیر شناور 32 بیتی

tfl.floor_div (tfl :: floordivop)

اپراتور طبقه

عملیات تقسیم طبقه عناصر.

صفات ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور شناور 32 بیتی یا عدد صحیح بدون امضا یا عدد عدد صحیح 16 بیتی یا مقادیر عدد صحیح 32 بیتی
rhs تانسور شناور 32 بیتی یا عدد صحیح بدون امضا یا عدد عدد صحیح 16 بیتی یا مقادیر عدد صحیح 32 بیتی

نتایج:

نتیجه شرح
output تانسور شناور 32 بیتی یا عدد صحیح بدون امضا یا عدد عدد صحیح 16 بیتی یا مقادیر عدد صحیح 32 بیتی

tfl.floor_mod (tfl :: floormodop)

یادآوری تقسیم

عملیات یادآوری تقسیم عناصر.

صفات ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور عدد صحیح 8 بیتی بدون امضا یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی بدون علامت 64 بیتی یا مقادیر شناور 32 بیتی
rhs تانسور عدد صحیح 8 بیتی بدون امضا یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی بدون علامت 64 بیتی یا مقادیر شناور 32 بیتی

نتایج:

نتیجه شرح
output تانسور عدد صحیح 8 بیتی بدون امضا یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی بدون علامت 64 بیتی یا مقادیر شناور 32 بیتی

tfl.fully_connected (tfl :: fullyconnectedop)

OP کاملاً متصل

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult ، quant::AccumulatorUniformScale<2, 0, 1> ، quant::AffineOpCoefficient<0, 1>

رابط ها: AffineQuantizedOpInterface ، ConditionallySpeculatable ، DynamicRangeQuantizedOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TFL_SparseOp ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function :: mlir :: stringAttr ویژگی رشته ای که مقدار آن هیچکدام ، یا Relu_n1_to_1 ، یا Relu6 ، یا TanH یا scale_bit است.
weights_format :: mlir :: stringAttr ویژگی رشته ای که مقدار آن به طور پیش فرض است ، یا shuffled4x16int8
keep_num_dims :: mlir :: boolattr ویژگی بول
asymmetric_quantize_inputs :: mlir :: boolattr ویژگی بول

عملیات:

عملوند شرح
input تانسور از نوع شناور 32 بیتی یا نوع Qi8 یا نوع Qi8 یا نوع QI16 یا مقادیر نوع QI16
filter تانسور از نوع شناور 32 بیتی یا نوع Qi4 یا نوع QI8 یا نوع Qi8 یا نوع QI16
bias تانسور از هر نوع مقادیر یا هیچ نوع

نتایج:

نتیجه شرح
output متغیر از تانسور از هر نوع مقادیر

tfl.gather (tfl :: جمع)

اپراتور جمع کردن

برش ها را از axis params Axis مطابق با indices جمع کنید.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، DynamicRangeQuantizedOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
axis :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
batch_dims :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا

عملیات:

عملوند شرح
params تانسور از شناور 32 بیتی یا عدد صحیح بدون امضا یا 4 بیتی عدد صحیح بدون امضا یا عدد صحیح 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 64 بیتی یا نوع رشته tflite یا نوع tflite یا 8-bit عدد صحیح بدون امضا یا نوع QI8 یا نوع Qi8 یا نوع QI16
indices تانسور عدد عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا مقادیر عدد صحیح بدون امضا 64 بیتی

نتایج:

نتیجه شرح
output تانسور از شناور 32 بیتی یا عدد صحیح بدون امضا یا 4 بیتی عدد صحیح بدون امضا یا عدد صحیح 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 64 بیتی یا نوع رشته tflite یا نوع tflite یا 8-bit عدد صحیح بدون امضا یا نوع QI8 یا نوع Qi8 یا نوع QI16

tfl.gather_nd (tfl :: gatherndop)

_ گرم اپراتور

برش ها را از params به تانسور با شکل مشخص شده توسط indices جمع کنید.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
params تانسور شناور 32 بیتی یا عدد صحیح بدون امضاء 1 بیتی یا عدد صحیح 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 64 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 8 بیتی یا نوع QI8 یا مقادیر نوع رشته Tflite
indices تانسور عدد عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا مقادیر عدد صحیح بدون امضا 64 بیتی

نتایج:

نتیجه شرح
output تانسور شناور 32 بیتی یا عدد صحیح بدون امضاء 1 بیتی یا عدد صحیح 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 64 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 8 بیتی یا نوع QI8 یا مقادیر نوع رشته Tflite

tfl.gelu (tfl :: geluop)

عملکرد فعال سازی GELU.

عملکرد فعال سازی GELU را از نظر عناصر محاسبه می کند.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
approximate :: mlir :: boolattr ویژگی بول

عملیات:

عملوند شرح
input تانسور از مقادیر شناور 32 بیتی یا نوع Qi8 یا نوع Qi8

نتایج:

نتیجه شرح
output تانسور از مقادیر شناور 32 بیتی یا نوع Qi8 یا نوع Qi8

tfl.greater (tfl :: greaterop)

عملگر بزرگ

عملیات بیشتر عناصر عاقلانه.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی بدون امضا یا 64 بیتی بدون امضا یا نوع Qui8 یا نوع Qi8 یا مقادیر نوع QI8 یا TFLITE
rhs تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی بدون امضا یا 64 بیتی بدون امضا یا نوع Qui8 یا نوع Qi8 یا مقادیر نوع QI8 یا TFLITE

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.greater_equal (tfl :: greaterequalop)

_ اپراتور برابر

عملیات GREATER_EQUAL ELETIES.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور از شناور 32 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 64 بیتی بدون امضا یا نوع Qui8 یا نوع Qi8
rhs تانسور از شناور 32 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح 64 بیتی بدون امضا یا نوع Qui8 یا نوع Qi8

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.hard_swish (tfl :: hardswishop)

عملکرد فعال سازی سخت.

محاسبه عملکرد فعال سازی سخت f (x)-> (x * relu6 (x+3))/6 عنصر عاقلانه.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
input تانسور از مقادیر شناور 32 بیتی یا نوع qui8 یا نوع QI8

نتایج:

نتیجه شرح
output تانسور از مقادیر شناور 32 بیتی یا نوع qui8 یا نوع QI8

tfl.hashtable (tfl :: hashtableop)

یک جدول هش غیر محض ایجاد می کند.

این OP یک جدول هش ایجاد می کند و نوع کلیدها و مقادیر آن را مشخص می کند. قبل از استفاده از جدول ، باید آن را اولیه کنید. پس از اولیه سازی جدول تغییر ناپذیر خواهد بود.

رابط ها: TflRuntimeVerifyOpInterface

ویژگی های:

صفت نوع MLIR شرح
table_id :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
key_dtype :: mlir :: typeattr هر نوع ویژگی
value_dtype :: mlir :: typeattr هر نوع ویژگی

نتایج:

نتیجه شرح
out تانسور مقادیر منابع

tfl.hashtable_find (tfl :: hashtablefindop)

کلیدها را در یک جدول جستجو می کند ، مقادیر مربوطه را خروجی می کند.

keys تانسور باید از همان نوع کلیدهای جدول استفاده کنند. values خروجی از نوع مقادیر جدول است.

SCALAR default_value خروجی مقدار کلیدهایی است که در جدول موجود نیست. همچنین باید از همان نوع مقادیر جدول باشد.

رابط ها: TflRuntimeVerifyOpInterface

عملیات:

عملوند شرح
hash_table تانسور مقادیر منابع
keys تانسور از عدد صحیح 32 بیتی یا نوع رشته Tflite یا مقادیر عدد صحیح 64 بیتی بدون امضا
default_value تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی یا نوع رشته Tflite یا مقادیر عدد صحیح 64 بیتی

نتایج:

نتیجه شرح
out تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی یا نوع رشته Tflite یا مقادیر عدد صحیح 64 بیتی

tfl.hashtable_import (tfl :: hashtableimportop)

محتویات جدول را با کلیدها و مقادیر مشخص شده جایگزین می کند.

keys تانسور باید از همان نوع کلیدهای جدول باشند. values تانسور باید از نوع مقادیر جدول باشد.

رابط ها: TflRuntimeVerifyOpInterface

عملیات:

عملوند شرح
hash_table تانسور مقادیر منابع
keys تانسور از عدد صحیح 32 بیتی یا نوع رشته Tflite یا مقادیر عدد صحیح 64 بیتی بدون امضا
values تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی یا نوع رشته Tflite یا مقادیر عدد صحیح 64 بیتی

tfl.hashtable_size (tfl :: hashtablesizeop)

تعداد عناصر موجود در جدول داده شده را محاسبه می کند.

رابط ها: TflRuntimeVerifyOpInterface

عملیات:

عملوند شرح
hash_table تانسور مقادیر منابع

نتایج:

نتیجه شرح
out تانسور از مقادیر عدد صحیح بدون امضا 64 بیتی

tfl.if (tfl :: ifop)

عملیات IF-Then-Eten

عملیات tfl.if نشان دهنده یک ساختار IF-Then-Else برای اجرای شرطی دو منطقه کد است. عمل به یک عملیات IF یک مقدار بولی است. مثلا:

tfl.if %b  {
  ...
} else {
  ...
}

tfl.if همچنین ممکن است نتایج را که در مناطق آن تعریف شده است بازگرداند. مقادیر تعریف شده تعیین می شود که با استفاده از مسیر اجرای آن انجام می شود.

مثال:

%x, %y = tfl.if %b -> (tensor<f32>, tensor<f32>) {
  %x_true = ...
  %y_true = ...
  tfl.yield %x_true, %y_true : tensor<f32>, tensor<f32>
} else {
  %x_false = ...
  %y_false = ...
  tfl.yield %x_false, %y_false : tensor<f32>, tensor<f32>
}

مناطق tfl.if همیشه با "tfl.yield" خاتمه می یابد. اگر "tfl.if" هیچ مقداری را تعریف نکند ، "tfl.yield" را می توان از بین برد و به طور ضمنی وارد می شود. در غیر این صورت ، باید صریح باشد. همچنین ، اگر "tfl.if" یک یا چند مقدار را تعریف کند ، بلوک "Else" نمی تواند حذف شود.

مثال:

tfl.if %b  {
  ...
}

صفات: NoRegionArguments ، RecursiveMemoryEffects ، SingleBlockImplicitTerminator<YieldOp> ، SingleBlock

رابط ها: RegionBranchOpInterface ، TflRuntimeVerifyOpInterface

عملیات:

عملوند شرح
cond تانسور مقادیر عدد صحیح بدون امضا

نتایج:

نتیجه شرح
results متغیر از تانسور از هر نوع مقادیر

tfl.imag (tfl :: imagop)

قسمت خیالی یک عدد پیچیده را برمی گرداند.

با توجه به input تانسور از اعداد پیچیده ، این عمل یک تانسور از نوع float را برمی گرداند که قسمت خیالی هر عنصر در input است. تمام عناصر موجود در input باید تعداد پیچیده ای از فرم \(a + bj\)باشند ، جایی که A قسمت واقعی است و B قسمت خیالی است که توسط این عملیات بازگردانده می شود.

صفات: AlwaysSpeculatableImplTrait ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
input تانسور از نوع پیچیده با عناصر شناور 32 بیتی یا نوع پیچیده با مقادیر عناصر شناور 64 بیتی

نتایج:

نتیجه شرح
output تانسور از شناور 32 بیتی یا مقادیر شناور 64 بیتی

tfl.l2_normalization (tfl :: l2normalizationOp)

L2 اپراتور را عادی کنید

l2 normalization op

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، FixedOutputRangeInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function :: mlir :: stringAttr ویژگی رشته ای که مقدار آن هیچکدام ، یا Relu_n1_to_1 ، یا Relu6 ، یا TanH یا scale_bit است.

عملیات:

عملوند شرح
input تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا نوع qui16 یا نوع qi16 یا مقادیر عدد صحیح 8 بیتی

نتایج:

نتیجه شرح
output تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا نوع qui16 یا نوع qi16 یا مقادیر عدد صحیح 8 بیتی

tfl.leaky_relu (tfl :: leakyreluop)

اپراتور Leaky Relu

Element Wise Leaky Relu Operator X -> x> = 0؟ X: (آلفا * x)

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
alpha :: mlir :: floatattr ویژگی شناور 32 بیتی

عملیات:

عملوند شرح
input تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا tflite quint8 نوع یا نوع QI16

نتایج:

نتیجه شرح
output تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا tflite quint8 نوع یا نوع QI16

tfl.less (tfl :: letherop)

عملگر کمتر

عملیات کمتر عناصر.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور از شناور 32 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا نوع Qi8 یا نوع Qi8 یا Tflite Quint8 Type
rhs تانسور از شناور 32 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا نوع Qi8 یا نوع Qi8 یا Tflite Quint8 Type

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.less_equal (tfl :: lessequalop)

_ بیش از اپراتور برابر

عملیات LECT_EQUAL Elementies.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی بدون علامت یا 64 بیتی بدون امضا یا نوع Qi8 یا مقادیر نوع Qi8
rhs تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی بدون علامت یا 64 بیتی بدون امضا یا نوع Qi8 یا مقادیر نوع Qi8

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.local_response_normalization (tfl :: localResponseNormalizationOp)

عادی سازی پاسخ محلی.

تانسور input 4 بعدی به عنوان یک آرایه 3 بعدی از بردارهای 1 بعدی (در طول آخرین بعد) درمان می شود و هر بردار به طور مستقل نرمال می شود. در یک وکتور معین ، هر مؤلفه با کل ورودی و مربع ورودی در depth_radius تقسیم می شود. به تفصیل،

sqr_sum[a, b, c, d] =
    sum(input[a, b, c, d - depth_radius : d + depth_radius + 1] ** 2)
output = input / (bias + alpha * sqr_sum) ** beta

برای جزئیات بیشتر ، به Krizhevsky و همکاران ، طبقه بندی Imagenet با شبکه های عصبی عمیق حلقوی مراجعه کنید (NIPS 2012) .

صفات: AlwaysSpeculatableImplTrait ، InferTensorType ، TF::SameOperandsAndResultTypeResolveRef

رابط ها: ConditionallySpeculatable ، InferShapedTypeOpInterface ، InferTypeOpInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
radius :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
bias :: mlir :: floatattr ویژگی شناور 32 بیتی
alpha :: mlir :: floatattr ویژگی شناور 32 بیتی
beta :: mlir :: floatattr ویژگی شناور 32 بیتی

عملیات:

عملوند شرح
input تانسور از مقادیر شناور 32 بیتی

نتایج:

نتیجه شرح
output تانسور از مقادیر شناور 32 بیتی

tfl.log (tfl :: logop)

اپراتور لگاریتم طبیعی

عملکرد لگاریتم طبیعی عناصر عناصر را بر روی ورودی انجام می دهد.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
x تانسور از مقادیر شناور 32 بیتی یا نوع Qi8

نتایج:

نتیجه شرح
y تانسور از مقادیر شناور 32 بیتی یا نوع Qi8

tfl.log_softmax (tfl :: logsoftmaxop)

اپراتور SoftMax را وارد کنید

فعال سازی های Log Element Wise Log را با فرمول زیر محاسبه می کند

ورودی - ورود به سیستم (read_sum (exp (ورودی) ، کم نور))

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، FixedOutputRangeInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
input تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا مقادیر نوع tflite quint8

نتایج:

نتیجه شرح
output تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا مقادیر نوع tflite quint8

tfl.logical_and (tfl :: logicalandop)

منطقی و اپراتور

عناصر منطقی و عملیاتی.

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور مقادیر عدد صحیح بدون امضا
rhs تانسور مقادیر عدد صحیح بدون امضا

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.logical_not (tfl :: logicalnotop)

منطقی نه اپراتور

عملیات منطقی عناصر عناصر.

صفات: AlwaysSpeculatableImplTrait ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور مقادیر عدد صحیح بدون امضا

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.logical_or (tfl :: logicalorop)

منطقی یا اپراتور

عناصر منطقی یا عملیاتی.

صفات: AlwaysSpeculatableImplTrait

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور مقادیر عدد صحیح بدون امضا
rhs تانسور مقادیر عدد صحیح بدون امضا

نتایج:

نتیجه شرح
output تانسور مقادیر عدد صحیح بدون امضا

tfl.logistic (tfl :: logisticop)

اپراتور لجستیک

سیگموئید عناصر ورودی را محاسبه می کند

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult ، SameOperandsAndResultShape

رابط ها: ConditionallySpeculatable ، FixedOutputRangeInterface ، NoMemoryEffect (MemoryEffectOpInterface) ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
x تانسور از نوع شناور 32 بیتی یا نوع Qi8 یا نوع Qi8 یا نوع QI16 یا Tflite Type Type

نتایج:

نتیجه شرح
y تانسور از نوع شناور 32 بیتی یا نوع Qi8 یا نوع Qi8 یا نوع QI16 یا Tflite Type Type

tfl.lstm (tfl :: lstmop)

اپراتور کامل LSTM

واحد حافظه کوتاه مدت کوتاه مدت (LSTM) لایه شبکه مکرر. اجرای پیش فرض غیر Peephole بر اساس: http://deeplearning.cs.cmu.edu/pdfs/hochreiter97_lstm.pdf S. Hochreiter و J. Schmidhuber. "حافظه کوتاه مدت طولانی". محاسبات عصبی ، 9 (8): 1735-1780 ، 1997. اجرای Peephole بر اساس: https://research.google.com/archive/43905.pdf Hasim Sak ، Andrew Senior و Francoise Beaufays است. "حافظه کوتاه مدت کوتاه مدت معماری شبکه عصبی مکرر برای مدل سازی آکوستیک در مقیاس بزرگ." interspeech ، 2014. اتصال دروازه ورودی و فراموش شده (CIFG) بر اساس: http://arxiv.org/pdf/1503.04069.pdf Greff و همکاران. 'lstm: یک فضای جستجو ادیسه' عادی سازی لایه بر اساس: https://arxiv.org/pdf/1607.06450.pdf ba et al. "عادی سازی لایه"

صفات: QuantizableResult

رابط ها: DynamicRangeQuantizedOpInterface ، TFL_StatefulOp ، TflRuntimeVerifyOpInterface

ویژگی های:

صفت نوع MLIR شرح
fused_activation_function :: mlir :: stringAttr ویژگی رشته ای که مقدار آن هیچکدام ، یا Relu_n1_to_1 ، یا Relu6 ، یا TanH یا scale_bit است.
cell_clip :: mlir :: floatattr ویژگی شناور 32 بیتی که ارزش آن غیر منفی است
proj_clip :: mlir :: floatattr ویژگی شناور 32 بیتی که ارزش آن غیر منفی است
kernel_type :: mlir :: tfl :: lstmkerneltypeattr lstm_kernel_type که مقدار آن mlir :: tfl :: lstmkerneltype :: کامل است
asymmetric_quantize_inputs :: mlir :: boolattr ویژگی بول
input_to_input_intermediate :: mlir :: typeattr هر نوع ویژگی
input_to_forget_intermediate :: mlir :: typeattr هر نوع ویژگی
input_to_cell_intermediate :: mlir :: typeattr هر نوع ویژگی
input_to_output_intermediate :: mlir :: typeattr هر نوع ویژگی
effective_hidden_scale_intermediate :: mlir :: typeattr هر نوع ویژگی

عملیات:

عملوند شرح
input تانسور از مقادیر شناور 32 بیتی یا نوع Qi8 یا نوع QI16
input_to_input_weights تانسور از هر نوع مقادیر یا هیچ نوع
input_to_forget_weights تانسور از مقادیر شناور 32 بیتی یا نوع Qi8
input_to_cell_weights تانسور از مقادیر شناور 32 بیتی یا نوع Qi8
input_to_output_weights تانسور از مقادیر شناور 32 بیتی یا نوع Qi8
recurrent_to_input_weights تانسور از هر نوع مقادیر یا هیچ نوع
recurrent_to_forget_weights تانسور از مقادیر شناور 32 بیتی یا نوع Qi8
recurrent_to_cell_weights تانسور از مقادیر شناور 32 بیتی یا نوع Qi8
recurrent_to_output_weights تانسور از مقادیر شناور 32 بیتی یا نوع Qi8
cell_to_input_weights تانسور از هر نوع مقادیر یا هیچ نوع
cell_to_forget_weights تانسور از هر نوع مقادیر یا هیچ نوع
cell_to_output_weights تانسور از هر نوع مقادیر یا هیچ نوع
input_gate_bias تانسور از هر نوع مقادیر یا هیچ نوع
forget_gate_bias تانسور از مقادیر شناور 32 بیتی یا نوع QI32
cell_bias تانسور از مقادیر شناور 32 بیتی یا نوع QI32
output_gate_bias تانسور از مقادیر شناور 32 بیتی یا نوع QI32
projection_weights تانسور از هر نوع مقادیر یا هیچ نوع
projection_bias تانسور از هر نوع مقادیر یا هیچ نوع
input_activation_state تانسور بیان کننده
input_cell_state تانسور بیان کننده
input_layer_norm_coefficients تانسور از هر نوع مقادیر یا هیچ نوع
forget_layer_norm_coefficients تانسور از هر نوع مقادیر یا هیچ نوع
cell_layer_norm_coefficients تانسور از هر نوع مقادیر یا هیچ نوع
output_layer_norm_coefficients تانسور از هر نوع مقادیر یا هیچ نوع

نتایج:

نتیجه شرح
output تانسور از هر نوع مقادیر

tfl.matrix_diag (tfl :: ماتریسدیاگوپ)

یک تانسور را با مورب ارائه شده و هر چیز دیگری که با صفرها بسته بندی شده است ، برمی گرداند.

با توجه به مورب ، تانسور را با مورب و هر چیز دیگری که با صفرها خالی شده است ، برمی گرداند. فرض کنید مورب دارای ابعاد K [I, J, K, ..., N] است ، سپس خروجی یک تانسور رتبه k+1 با ابعاد است [I, J, K, ..., N, N] جایی: output[i, j, k, ..., m, n] = 1{m=n} * diagonal[i, j, k, ..., n].

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
diagonal تانسور از شناور 32 بیتی یا عدد صحیح بدون امضاء 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا عدد صحیح 8 بیتی یا نوع Qui8 یا نوع Qi8 یا نوع Qi8 یا Tflite Quint8

نتایج:

نتیجه شرح
output تانسور از شناور 32 بیتی یا عدد صحیح بدون امضاء 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا عدد صحیح 8 بیتی یا نوع Qui8 یا نوع Qi8 یا نوع Qi8 یا Tflite Quint8

tfl.matrix_set_diag (tfl :: matrixsetdiagop)

یک تانسور ماتریس دسته دار را با مقادیر مورب جدید جمع شده برمی گرداند.

با توجه به input و diagonal ، این عمل یک تانسور را با همان شکل و مقادیر input ، به جز مورب اصلی ماتریس های داخلی باز می گرداند. اینها توسط مقادیر موجود در diagonal می شوند.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
input تانسور از شناور 32 بیتی یا عدد صحیح بدون امضاء 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا عدد صحیح 8 بیتی یا نوع QI8 یا نوع QI16 یا نوع QI16 یا نوع Qi18 یا Tflelite Quint8 Type
diagonal تانسور از شناور 32 بیتی یا عدد صحیح بدون امضاء 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا عدد صحیح 8 بیتی یا نوع QI8 یا نوع QI16 یا نوع QI16 یا نوع Qi18 یا Tflelite Quint8 Type

نتایج:

نتیجه شرح
result تانسور از شناور 32 بیتی یا عدد صحیح بدون امضاء 8 بیتی یا عدد صحیح 16 بیتی یا عدد صحیح 32 بیتی یا عدد صحیح بدون امضا 64 بیتی یا عدد صحیح 8 بیتی یا نوع QI8 یا نوع QI16 یا نوع QI16 یا نوع Qi18 یا Tflelite Quint8 Type

tfl.max_pool_2d (tfl :: maxpool2dop)

حداکثر استخر 2D OP

حداکثر استخر 2D را در ورودی انجام می دهد.

ورودی ها: inputs[0] : مورد نیاز: تانسور ورودی

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflArithmeticCountOpInterface ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
padding :: mlir :: stringAttr ویژگی رشته ای که مقدار آن یکسان است یا معتبر است
stride_w :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
stride_h :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
filter_width :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
filter_height :: mlir :: integerattr ویژگی عدد صحیح 32 بیتی بدون امضا
fused_activation_function :: mlir :: stringAttr ویژگی رشته ای که مقدار آن هیچکدام ، یا Relu_n1_to_1 ، یا Relu6 ، یا TanH یا scale_bit است.

عملیات:

عملوند شرح
input تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا نوع Qi16 یا مقادیر نوع quint8 tflite

نتایج:

نتیجه شرح
output تانسور از نوع شناور 32 بیتی یا نوع qui8 یا نوع Qi8 یا نوع Qi16 یا مقادیر نوع quint8 tflite

tfl.maximum (tfl :: حداکثر)

حداکثر عملگر

عملیات حداکثر عناصر.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، Commutative ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور شناور 32 بیتی یا عدد صحیح 32/64 بیتی یا نوع Qi8 یا نوع Qui8 یا مقادیر نوع QI16
rhs تانسور شناور 32 بیتی یا عدد صحیح 32/64 بیتی یا نوع Qi8 یا نوع Qui8 یا مقادیر نوع QI16

نتایج:

نتیجه شرح
max تانسور شناور 32 بیتی یا عدد صحیح 32/64 بیتی یا نوع Qi8 یا نوع Qui8 یا مقادیر نوع QI16

tfl.mean (tfl :: meanop)

میانگین عملگر

میانگین عناصر را در ابعاد یک تانسور محاسبه می کند. input_tensor را در امتداد ابعاد داده شده در محور کاهش می دهد. مگر در مواردی که Keepdims صحیح باشد ، درجه تانسور برای هر ورودی در محور 1 کاهش می یابد. اگر Keepdims درست باشد ، ابعاد کاهش یافته با طول 1 حفظ می شوند.

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

ویژگی های:

صفت نوع MLIR شرح
keep_dims :: mlir :: boolattr ویژگی بول

عملیات:

عملوند شرح
input تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی بدون علامت یا 64 بیتی بدون امضا یا نوع Qi8 یا نوع qui8 یا عدد صحیح یا 8 بیتی بدون امضا یا مقادیر نوع QI16
axis تانسور از مقادیر عدد صحیح 32 بیتی

نتایج:

نتیجه شرح
output تانسور شناور 32 بیتی یا عدد صحیح 32 بیتی بدون علامت یا 64 بیتی بدون امضا یا نوع Qi8 یا نوع qui8 یا عدد صحیح یا 8 بیتی بدون امضا یا مقادیر نوع QI16

tfl.minimum (tfl :: minimumop)

حداقل عملگر

عملیات حداقل عناصر عناصر.

صفات: ::mlir::OpTrait::TFLRuntimeOpTrait ، AlwaysSpeculatableImplTrait ، Commutative ، QuantizableResult ، ResultsBroadcastableShape

رابط ها: ConditionallySpeculatable ، NoMemoryEffect (MemoryEffectOpInterface) ، SameOperandsAndResultsScale ، TflRuntimeVerifyOpInterface

اثرات: MemoryEffects::Effect{}

عملیات:

عملوند شرح
lhs تانسور شناور 32 بیتی یا عدد صحیح 32/64 بیتی یا نوع Qi8 یا نوع Qui8 یا مقادیر نوع QI16
rhs تانسور شناور 32 بیتی یا عدد صحیح 32/64 بیتی یا نوع Qi8 یا نوع Qui8 یا مقادیر نوع QI16

نتایج:

نتیجه شرح
min تانسور شناور 32 بیتی یا عدد صحیح 32/64 بیتی یا نوع Qi8 یا نوع Qui8 یا مقادیر نوع QI16

tfl.mirror_pad (tfl :: mirrorpadop)

اپراتور Mirrorpad. لنت یک تانسور با مقادیر آینه دار.

این عملیات ورودی با مقادیر آینه ای مطابق با بالشتک هایی که مشخص می کنید ، می باشد. Paddings یک تانسور عدد صحیح با شکل [n ، 2] است ، جایی که n رتبه ورودی است. برای هر ابعاد d از ورودی ، بالشتک ها [D ، 0] نشان می دهد که چه مقدار مقادیر قبل از محتوای ورودی در آن بعد اضافه می شود ، و بالشتک ها [D ، 1] نشان می دهد که چه مقدار مقادیر بعد از محتوای ورودی در آن بعد اضافه می شود.

هر دو بالشتک [D ، 0] و Paddings [D ، 1] نباید بیشتر از input.dim_size (d) (یا input.dim_size (d) - 1) اگر کپی_برای صحیح است (اگر نادرست باشد).

اندازه خالی از هر بعد D خروجی:

paddings (d ، 0) + input.dim_size (d) + paddings (d ، 1)

صفات: AlwaysSpeculatableImplTrait ، QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
mode ::mlir::TFL::MirrorPaddingTypeAttr mirror_pad_enum

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or QI16 type values
pad tensor of 32-bit signless integer or 64-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or QI16 type values

tfl.mul (TFL::MulOp)

عملگر ضرب

Element-wise multiplication operation.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , Commutative , QuantizableResult , ResultsBroadcastableShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflArithmeticCountOpInterface , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
fused_activation_function ::mlir::StringAttr string attribute whose value is NONE, or RELU, or RELU_N1_TO_1, or RELU6, or TANH, or SIGN_BIT

Operands:

عملوند شرح
lhs tensor of 32-bit float or 32-bit signless integer or 32-bit unsigned integer or 64-bit signless integer or QI8 type or QUI8 type or QI16 type or 16-bit signless integer or complex type with 32-bit float elements values
rhs tensor of 32-bit float or 32-bit signless integer or 32-bit unsigned integer or 64-bit signless integer or QI8 type or QUI8 type or QI16 type or 16-bit signless integer or complex type with 32-bit float elements values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 32-bit unsigned integer or 64-bit signless integer or QI8 type or QUI8 type or QI16 type or 16-bit signless integer or complex type with 32-bit float elements values

tfl.multinomial (TFL::MultinomialOp)

Draws samples from a categorical distribution.

The generated values will have a categorical distribution based on the logits or unnormalized log-probabilities provided for all classes.

Interfaces: TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
seed ::mlir::IntegerAttr 64-bit signless integer attribute
seed2 ::mlir::IntegerAttr 64-bit signless integer attribute

Operands:

عملوند شرح
logits tensor of 32-bit float values
num_samples tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
out tensor of 32-bit signless integer or 64-bit signless integer values

tfl.neg (TFL::NegOp)

Negation operator

Computes element-wise negation of input

Traits: AlwaysSpeculatableImplTrait , InferTensorType , TF::SameOperandsAndResultTypeResolveRef

Interfaces: ConditionallySpeculatable , InferShapedTypeOpInterface , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer values

نتایج:

نتیجه شرح
y tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer values

tfl.no_value (TFL::NoValueOp)

Constant representing no value.

No value constant op.

Traits: AlwaysSpeculatableImplTrait , ConstantLike

Interfaces: ConditionallySpeculatable , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
value ::mlir::UnitAttr unit attribute

نتایج:

نتیجه شرح
none_val none type

tfl.non_max_suppression_v4 (TFL::NonMaxSuppressionV4Op)

Greedily selects a subset of bounding boxes in descending order of score,

pruning away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes with score less than score_threshold are removed. Bounding boxes are supplied as [y1, x1, y2, x2], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (ie, lying in the interval [0, 1]) or absolute. Note that this algorithm is agnostic to where the origin is in the coordinate system and more generally is invariant to orthogonal transformations and translations of the coordinate system; thus translating or reflections of the coordinate system result in the same boxes being selected by the algorithm. The output of this operation is a set of integers indexing into the input collection of bounding boxes representing the selected boxes. The bounding box coordinates corresponding to the selected indices can then be obtained using the tf.gather operation . For example: selected_indices = tf.image.non_max_suppression_v2( boxes, scores, max_output_size, iou_threshold, score_threshold) selected_boxes = tf.gather(boxes, selected_indices)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
boxes tensor of 32-bit float values
scores tensor of 32-bit float values
max_output_size tensor of 32-bit signless integer values
iou_threshold tensor of 32-bit float values
score_threshold tensor of 32-bit float values

نتایج:

نتیجه شرح
selected_indices tensor of 32-bit signless integer values
valid_outputs tensor of 32-bit signless integer values

tfl.non_max_suppression_v5 (TFL::NonMaxSuppressionV5Op)

Greedily selects a subset of bounding boxes in descending order of score,

pruning away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes with score less than score_threshold are removed. Bounding boxes are supplied as [y1, x1, y2, x2], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (ie, lying in the interval [0, 1]) or absolute. Note that this algorithm is agnostic to where the origin is in the coordinate system and more generally is invariant to orthogonal transformations and translations of the coordinate system; thus translating or reflections of the coordinate system result in the same boxes being selected by the algorithm. The output of this operation is a set of integers indexing into the input collection of bounding boxes representing the selected boxes. The bounding box coordinates corresponding to the selected indices can then be obtained using the tf.gather operation . For example: selected_indices = tf.image.non_max_suppression_v2( boxes, scores, max_output_size, iou_threshold, score_threshold) selected_boxes = tf.gather(boxes, selected_indices) This op also supports a Soft-NMS (with Gaussian weighting) mode (cf Bodla et al, https://arxiv.org/abs/1704.04503 ) where boxes reduce the score of other overlapping boxes instead of directly causing them to be pruned. To enable this Soft-NMS mode, set the soft_nms_sigma parameter to be larger than 0.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
boxes tensor of 32-bit float values
scores tensor of 32-bit float values
max_output_size tensor of 32-bit signless integer values
iou_threshold tensor of 32-bit float values
score_threshold tensor of 32-bit float values
soft_nms_sigma tensor of 32-bit float values

نتایج:

نتیجه شرح
selected_indices tensor of 32-bit signless integer values
selected_scores tensor of 32-bit float values
valid_outputs tensor of 32-bit signless integer values

tfl.not_equal (TFL::NotEqualOp)

_Not equal operator

Element-wise not_equal operation.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , Commutative , ResultsBroadcastableShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
lhs tensor of 1-bit signless integer or 32-bit float or 32-bit signless integer or 64-bit signless integer or QUI8 type or QI8 type or TFLite quint8 type or TFLite string type values
rhs tensor of 1-bit signless integer or 32-bit float or 32-bit signless integer or 64-bit signless integer or QUI8 type or QI8 type or TFLite quint8 type or TFLite string type values

نتایج:

نتیجه شرح
output tensor of 1-bit signless integer values

tfl.NumericVerify (TFL::NumericVerifyOp)

Verifies the numericals of the two operands

The NumericVerify op is a debugging op to verify the numericals of the two activations. It is a custom op in TFLite. If log_if_failed is true, the NumericVerify op calculates statistics on differences between float and quantized activations, output logs, set differences to the output tensors, and throws an error if errors above tolerance exist. If log_if_failed = false, then it doesn't care about errors.

Traits: QuantizableResult , SameOperandsShape

Interfaces: TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
tolerance ::mlir::FloatAttr 32-bit float attribute
log_if_failed ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of QI8 type or QUI8 type or QI16 type or 16-bit float or TFLite quint8 type values
ref tensor of 32-bit float values

نتایج:

نتیجه شرح
output tensor of 32-bit float values

tfl.one_hot (TFL::OneHotOp)

OneHot operator

Returns a one-hot tensor.The locations represented by indices in indices take value on_value , while all other locations take value off_value .

If the input indices is rank N , the output will have rank N+1 , The new axis is created at dimension axis (default: the new axis is appended at the end).

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
axis ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

عملوند شرح
indices tensor of 32-bit signless integer or 64-bit signless integer values
depth tensor of 32-bit signless integer values
on_value tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer or 8-bit signless integer or 8-bit unsigned integer values
off_value tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer or 8-bit signless integer or 8-bit unsigned integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer or 8-bit signless integer or 8-bit unsigned integer values

tfl.pack (TFL::PackOp)

Packs a list of tensors along a dimension into one tensor

Packs a list of values_count rank- R tensors into one rank- (R+1) tensor.

Packs the values_count tensors in values into a tensor with rank one higher than each tensor in values , by packing them along the axis dimension.

Given a list of tensors of shape (A, B, C) ;

if axis == 0 then the output tensor will have the shape (N, A, B, C) . if axis == 1 then the output tensor will have the shape (A, N, B, C) . و غیره.

مثلا:

# 'x' is [1, 4]
# 'y' is [2, 5]
# 'z' is [3, 6]
pack([x, y, z]) => [[1, 4], [2, 5], [3, 6]]  # Pack along first dim.
pack([x, y, z], axis=1) => [[1, 2, 3], [4, 5, 6]]

This is the opposite of unpack .

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
values_count ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive
axis ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

عملوند شرح
values variadic of tensor of any type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

tfl.pad (TFL::PadOp)

Padding operator

This operation pads a input with zeros according to the paddings you specify. paddings is an integer tensor with shape [Dn, 2] , where n is the rank of input . For each dimension D of input , paddings[D, 0] indicates how many zeros to add before the contents of input in that dimension, and paddings[D, 1] indicates how many zeros to add after the contents of input in that dimension.

The padded size of each dimension D of the output is:

paddings(D, 0) + input.dim_size(D) + paddings(D, 1)

مثلا:

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# rank of 't' is 2
pad(t, paddings) ==> [[0, 0, 0, 0, 0, 0]
                      [0, 0, 1, 1, 0, 0]
                      [0, 0, 2, 2, 0, 0]
                      [0, 0, 0, 0, 0, 0]]

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
padding tensor of 32/64-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.padv2 (TFL::PadV2Op)

Padding operator v2

This operation pads a input according to the paddings and constant_values you specify. paddings is an integer tensor with shape [Dn, 2] , where n is the rank of input . For each dimension D of input , paddings[D, 0] indicates how many zeros to add before the contents of input in that dimension, and paddings[D, 1] indicates how many zeros to add after the contents of input in that dimension. constant_values is a scalar tensor of the same type as input that indicates the value to use for padding input .

The padded size of each dimension D of the output is:

paddings(D, 0) + input.dim_size(D) + paddings(D, 1)

مثلا:

# 't' is [[1, 1], [2, 2]]
# 'paddings' is [[1, 1], [2, 2]]
# rank of 't' is 2
pad(t, paddings) ==> [[0, 0, 0, 0, 0, 0]
                      [0, 0, 1, 1, 0, 0]
                      [0, 0, 2, 2, 0, 0]
                      [0, 0, 0, 0, 0, 0]]

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite quint8 type values
padding tensor of 32/64-bit signless integer values
constant_values tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite quint8 type values

tfl.poly_call (TFL::PolyCallOp)

Poly call

Have multiple function bodies for the same computation. This allows a program compiler/interpreter to choose one of the available options to execute the program based on which one is most suitable for the target backend.

input: A list of input tensors whose types are T. output: A list of output tensors whose types are T.

call: Multiple regions, each of which encapsulates the same semantic computation but in different forms.

Traits: SingleBlockImplicitTerminator<YieldOp> , SingleBlock

Interfaces: RegionBranchOpInterface

Operands:

عملوند شرح
input variadic of tensor of any type values

نتایج:

نتیجه شرح
output variadic of tensor of any type values

tfl.pow (TFL::PowOp)

Power operator

Element-wise power operation.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , ResultsBroadcastableShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
lhs tensor of 32-bit float or 32-bit signless integer values
rhs tensor of 32-bit float or 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer values

tfl.prelu (TFL::PReluOp)

Parameterized Relu operator

Parameterized Relu operator x -> x >= 0 ? x : (alpha * x) where alpha is a trainable tensor. input and alpha should be the same size as input or be broadcastable.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , QuantizableResult , ResultsBroadcastableShape , quant::AffineOpCoefficient<-1, 1>

Interfaces: AffineQuantizedOpInterface , ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or QI8 type or QUI8 type or TFLite quint8 type values
alpha tensor of 32-bit float or QI8 type or QUI8 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or QI8 type or QUI8 type or TFLite quint8 type values

tfl.pseudo_const (TFL::ConstOp)

Constant pseudo op.

Represents a constant value in TensorFlow Lite dialect. This is not an actual operation and it will be lowered to buffer instead.

The op is allowed to have all the same type of attributes as tf.Const does (eg, opaque TF attributes are allowed).

Traits: AlwaysSpeculatableImplTrait , ConstantLike , FirstAttrDerivedResultType , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
value ::mlir::ElementsAttr constant vector/tensor attribute

نتایج:

نتیجه شرح
output tensor of any type values

tfl.pseudo_qconst (TFL::QConstOp)

Quantized constant pseudo op

Represents a quantized constant value in TensorFlow Lite dialect. This is not an actual operation and it will be lowered to buffer instead. The quantization parameters are stored as a type attribute in this constant.

Traits: AlwaysSpeculatableImplTrait , FirstAttrDerivedResultType

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
qtype ::mlir::TypeAttr Tensor type attribute
value ::mlir::ElementsAttr constant vector/tensor attribute

نتایج:

نتیجه شرح
output tensor of QUI8 type or QI8 type or QI16 type or QUI16 type or TFLite quint8 type values

tfl.pseudo_sparse_const (TFL::SparseConstOp)

Sparse constant pseudo op.

Represents a sparse constant value in TensorFlow Lite dialect. This is not an actual operation and it will be lowered to buffer instead.

Traits: AlwaysSpeculatableImplTrait , FirstAttrDerivedResultType , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
value ::mlir::ElementsAttr constant vector/tensor attribute
s_param ::mlir::TFL::SparsityParameterAttr Sparsity parameter.
compressed_data ::mlir::ElementsAttr constant vector/tensor attribute

نتایج:

نتیجه شرح
output tensor of any type values

tfl.pseudo_sparse_qconst (TFL::SparseQConstOp)

Sparse quantized constant pseudo op

Represents a sparse quantized constant value in TensorFlow Lite dialect. This is not an actual operation and it will be lowered to buffer instead. The quantization parameters are stored as a type attribute in this constant.

Traits: AlwaysSpeculatableImplTrait , FirstAttrDerivedResultType

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
qtype ::mlir::TypeAttr Tensor type attribute
value ::mlir::ElementsAttr constant vector/tensor attribute
s_param ::mlir::TFL::SparsityParameterAttr Sparsity parameter.
compressed_data ::mlir::ElementsAttr constant vector/tensor attribute

نتایج:

نتیجه شرح
output tensor of QUI8 type or QI8 type or QI16 type or QUI16 type or TFLite quint8 type values

tfl.quantize (TFL::QuantizeOp)

Quantize operator

Converts floating point tensors to quantized integer tensors according to the quantization parameters defined in the type attribute.

Traits: FirstAttrDerivedResultType , SameOperandsAndResultShape

Interfaces: NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
qtype ::mlir::TypeAttr Tensor type attribute

Operands:

عملوند شرح
input tensor of 32-bit float or QI4 type or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of QI4 type or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

tfl.random_standard_normal (TFL::RandomStandardNormalOp)

Outputs random values from a normal distribution.

The generated values will have mean 0 and standard deviation 1.

Interfaces: TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
seed ::mlir::IntegerAttr 64-bit signless integer attribute
seed2 ::mlir::IntegerAttr 64-bit signless integer attribute

Operands:

عملوند شرح
shape tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
out tensor of 32-bit float values

tfl.random_uniform (TFL::RandomUniformOp)

Outputs random values from a uniform distribution.

The generated values follow a uniform distribution in the range [0, 1) . The lower bound 0 is included in the range, while the upper bound 1 is excluded.

Interfaces: TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
seed ::mlir::IntegerAttr 64-bit signless integer attribute
seed2 ::mlir::IntegerAttr 64-bit signless integer attribute

Operands:

عملوند شرح
shape tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
out tensor of 32-bit float values

tfl.range (TFL::RangeOp)

Range operator

Returns a 1D tensor defined by a sequence from start to limit with a given delta .

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
start tensor of 32-bit signless integer or 32-bit float or 64-bit signless integer values
limit tensor of 32-bit signless integer or 32-bit float or 64-bit signless integer values
delta tensor of 32-bit signless integer or 32-bit float or 64-bit signless integer values

نتایج:

نتیجه شرح
result tensor of 32-bit signless integer or 32-bit float or 64-bit signless integer values

tfl.rank (TFL::RankOp)

Rank operator.

Returns the rank of a tensor.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of any type values

نتایج:

نتیجه شرح
output tensor of any integer type

tfl.read_variable (TFL::ReadVariableOp)

Reads variable value.

Read variable data identified by 'resource_id'.

Interfaces: TflRuntimeVerifyOpInterface

Operands:

عملوند شرح
resource_id tensor of resource values

نتایج:

نتیجه شرح
result tensor of 32-bit float or 64-bit float or 1-bit signless integer or 8-bit unsigned integer or 8-bit signless integer or QI8 type or QUI8 type or 32-bit signless integer or 64-bit signless integer or QI16 type or complex type with 32-bit float elements or complex type with 64-bit float elements values

tfl.real (TFL::RealOp)

Returns the real part of a complex number.

Given a tensor input of complex numbers, this operation returns a tensor of type float that is the real part of each element in input . All elements in input must be complex numbers of the form \(a + bj\), where a is the real part returned by this operation and b is the imaginary part.

Traits: AlwaysSpeculatableImplTrait , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of complex type with 32-bit float elements or complex type with 64-bit float elements values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 64-bit float values

tfl.reduce_all (TFL::ReduceAllOp)

Computes the "logical and" of elements across dimensions of a tensor.

Reduces input along the dimensions given in axis . Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in axis . If keep_dims is true, the reduced dimensions are retained with length 1.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
keep_dims ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 1-bit signless integer values
reduction_indices tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 1-bit signless integer values

tfl.reduce_any (TFL::ReduceAnyOp)

Computes the "logical or" of elements across dimensions of a tensor.

Reduces input along the dimensions given in axis . Unless keep_dims is true, the rank of the tensor is reduced by 1 for each entry in axis . If keep_dims is true, the reduced dimensions are retained with length 1.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
keep_dims ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 1-bit signless integer values
reduction_indices tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 1-bit signless integer values

tfl.reduce_max (TFL::ReduceMaxOp)

Max-reduction operator

Computes the max reduction along the specified axes

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
keep_dims ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
axes tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.reduce_min (TFL::ReduceMinOp)

Min-reduction operator

Computes the min reduction along the specified axes

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
keep_dims ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
axes tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.reduce_prod (TFL::ReduceProdOp)

Prod-reduction operator

Computes the product along the specified axes

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
keep_dims ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
axes tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.relu (TFL::ReluOp)

Relu operator

Element-wise Relu operator x -> max(0, x)

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or QUI8 type or QI8 type or QI16 type values

نتایج:

نتیجه شرح
y tensor of 32-bit float or QUI8 type or QI8 type or QI16 type values

tfl.relu6 (TFL::Relu6Op)

Relu6 operator

Element-wise Relu6 operator x -> max(0, min(6, x))

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or QUI8 type or QI8 type values

نتایج:

نتیجه شرح
y tensor of 32-bit float or QUI8 type or QI8 type values

tfl.relu_0_to_1 (TFL::Relu0To1Op)

Relu0To1 operator

Element-wise Relu0To1 operator x -> max(0, min(1, x))

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or QUI8 type or QI8 type values

نتایج:

نتیجه شرح
y tensor of 32-bit float or QUI8 type or QI8 type values

tfl.relu_n1_to_1 (TFL::Relu1Op)

Relu1 operator

Element-wise Relu1 operator x -> max(-1, min(1, x))

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or QUI8 type or QI8 type values

نتایج:

نتیجه شرح
y tensor of 32-bit float or QUI8 type or QI8 type values

tfl.reshape (TFL::ReshapeOp)

Reshape operator

Produces a tensor with the same values but different static shape defined by the output type.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of any type values
shape tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of any type values

tfl.resize_bilinear (TFL::ResizeBilinearOp)

ResizeBilinear Op

Resize images to size using bilinear interpolation.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
align_corners ::mlir::BoolAttr bool attribute
half_pixel_centers ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 32-bit float or TFLite quint8 type or QUI8 type or QI8 type or QI16 type values
size tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or TFLite quint8 type or QUI8 type or QI8 type or QI16 type values

tfl.resize_nearest_neighbor (TFL::ResizeNearestNeighborOp)

ResizeNearestNeighbor Op

Resize images to size using nearest neighbor interpolation.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
align_corners ::mlir::BoolAttr bool attribute
half_pixel_centers ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 32-bit float or TFLite quint8 type or QUI8 type or QI8 type or QI16 type values
size tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or TFLite quint8 type or QUI8 type or QI8 type or QI16 type values

tfl.reverse_sequence (TFL::ReverseSequenceOp)

Reverses variable length slices.

This op first slices input along the dimension batch_dim , and for each slice i , reverses the first seq_lengths[i] elements along the dimension seq_dim .

The elements of seq_lengths must obey seq_lengths[i] <= input.dims[seq_dim] , and seq_lengths must be a vector of length input.dims[batch_dim] .

The output slice i along dimension batch_dim is then given by input slice i , with the first seq_lengths[i] slices along dimension seq_dim reversed.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
seq_dim ::mlir::IntegerAttr 32-bit signless integer attribute whose value is non-negative
batch_dim ::mlir::IntegerAttr 32-bit signless integer attribute whose value is non-negative

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI16 type or QUI8 type or TFLite quint8 type values
seq_lengths tensor of 32/64-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI16 type or QUI8 type or TFLite quint8 type values

tfl.reverse_v2 (TFL::ReverseV2Op)

ReverseV2 Operator

Reverses specific dimensions of a tensor.

Given a tensor, and a int32/int64 tensor axis representing the set of dimensions of tensor to reverse. This operation reverses each dimension i for which there exists j st axis[j] == i.

Args: tensor: A Tensor. Must be one of the following types: uint8, int8, int16, int32, int64, float32, bool Up to 8-D.

axis: A Tensor. Must be one of the following types: int32, int64. with only 1 element which is the axis index. TODO: Add support for multiple elements.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or 8-bit unsigned integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or QI16 type or QUI8 type or QI8 type or TFLite quint8 type or 1-bit signless integer values
axis tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 8-bit unsigned integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or QI16 type or QUI8 type or QI8 type or TFLite quint8 type or 1-bit signless integer values

tfl.rfft2d (TFL::RFFT2dOp)

2D real-valued fast Fourier transform.

Computes the 2-dimensional discrete Fourier transform of a real-valued signal over the inner-most 2 dimensions of input .

Since the DFT of a real signal is Hermitian-symmetric, RFFT2D only returns the fft_length / 2 + 1 unique components of the FFT for the inner-most dimension of output : the zero-frequency term, followed by the fft_length / 2 positive-frequency مقررات.

Along each axis RFFT2D is computed on, if fft_length is smaller than the corresponding dimension of input , the dimension is cropped. If it is larger, the dimension is padded with zeros.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float values
fft_length tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of complex type with 32-bit float elements values

tfl.right_shift (TFL::RightShiftOp)

Right Shift operator

Elementwise computes the bitwise right-shift of lhs by rhs .

Traits: AlwaysSpeculatableImplTrait , SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
lhs tensor of 8-bit signless integer or 8-bit unsigned integer or 16-bit signless integer or 16-bit unsigned integer or 32-bit signless integer or 32-bit unsigned integer values
rhs tensor of 8-bit signless integer or 8-bit unsigned integer or 16-bit signless integer or 16-bit unsigned integer or 32-bit signless integer or 32-bit unsigned integer values

نتایج:

نتیجه شرح
output tensor of 8-bit signless integer or 8-bit unsigned integer or 16-bit signless integer or 16-bit unsigned integer or 32-bit signless integer or 32-bit unsigned integer values

tfl.round (TFL::RoundOp)

Round operator

Rounds the values of a tensor to the nearest integer, element-wise.

Traits: AlwaysSpeculatableImplTrait , InferTensorType , TF::SameOperandsAndResultTypeResolveRef

Interfaces: ConditionallySpeculatable , InferShapedTypeOpInterface , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float values

نتایج:

نتیجه شرح
y tensor of 32-bit float values

tfl.rsqrt (TFL::RsqrtOp)

Reciprocal of square root operator

Computes element-wise reverse square root of input

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or QI8 type or QI16 type values

نتایج:

نتیجه شرح
y tensor of 32-bit float or QI8 type or QI16 type values

tfl.scatter_nd (TFL::ScatterNdOp)

_Scatter nd operator

Scatter updates into a new tensor according to indices

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
indices tensor of 32-bit signless integer values
updates tensor of 32-bit float or 8-bit signless integer or 64-bit signless integer or 32-bit signless integer or 8-bit unsigned integer or 1-bit signless integer values
shape 1D tensor of any type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 8-bit signless integer or 64-bit signless integer or 32-bit signless integer or 8-bit unsigned integer or 1-bit signless integer values

tfl.segment_sum (TFL::SegmentSumOp)

SegmentSum operator

Computes the sum along segments of a tensor.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer values
segment_ids tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer values

tfl.select (TFL::SelectOp)

اپراتور را انتخاب کنید

Select values of 'x' if the corresponding value of 'condition' is true or the value of 'y' if false. There are valid condition input sizes:

  1. Either the same shape (in which case the select is elementwise), or
  2. condition must be Rank 1 and match over the first dimension.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
condition tensor of 1-bit signless integer values
x tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values
y tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

tfl.select_v2 (TFL::SelectV2Op)

SelectV2 operator

Select values of 'x' if the corresponding value of 'condition' is true or the value of 'y' if false. There are valid condition input sizes:

  1. Either the same shape (in which case the select is elementwise), or
  2. Broadcastable shapes between 'condition', 'x' and 'y'.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , QuantizableResult , ResultsBroadcastableShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
condition tensor of 1-bit signless integer values
x tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values
y tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 32-bit unsigned integer or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

tfl.shape (TFL::ShapeOp)

عملگر شکل

Returns the shape of a tensor.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
out_type ::mlir::Attribute derived attribute

Operands:

عملوند شرح
input tensor of any type values

نتایج:

نتیجه شرح
output tensor of 32-bit signless integer or 64-bit signless integer values

tfl.sign (TFL::SignOp)

Sign operation

Returns NaN if x is NaN, 0 if x is 0, -1 if x < 0 and 1 if x > 0.

Traits: AlwaysSpeculatableImplTrait , SameOperandsAndResultElementType , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float or 64-bit float or 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 64-bit float or 32-bit signless integer values

tfl.sin (TFL::SinOp)

Sine operator

Computes element-wise Sine of input

Traits: AlwaysSpeculatableImplTrait , InferTensorType , TF::SameOperandsAndResultTypeResolveRef

Interfaces: ConditionallySpeculatable , InferShapedTypeOpInterface , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float values

نتایج:

نتیجه شرح
y tensor of 32-bit float values

tfl.slice (TFL::SliceOp)

Return a slice from 'input'.

The output tensor is a tensor with dimensions described by 'size' whose values are extracted from 'input' starting at the offsets in 'begin'.

begin is zero-based; size is one-based. If size[i] is -1, all remaining elements in dimension i are included in the slice. In other words, this is equivalent to setting: size[i] = input.dim_size(i) - begin[i]

Requirements : 0 <= begin[i] <= begin[i] + size[i] <= Di for i in [0, n)

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or 32-bit unsigned integer or 1-bit signless integer or TFLite string type or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
begin tensor of 32/64-bit signless integer values
size tensor of 32/64-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or 32-bit unsigned integer or 1-bit signless integer or TFLite string type or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.softmax (TFL::SoftmaxOp)

Softmax operator

Computes element-wise softmax activations with the following formula

exp(input) / tf.reduce_sum(exp(input * beta), dim)

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , FixedOutputRangeInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflArithmeticCountOpInterface , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
beta ::mlir::FloatAttr 32-bit float attribute

Operands:

عملوند شرح
input tensor of 32-bit float or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.space_to_batch_nd (TFL::SpaceToBatchNdOp)

SpaceToBatchNd operator

This operation reshapes space dimensions into the "batch" dimension 0

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
block_shape tensor of 32-bit signless integer values
paddings tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.space_to_depth (TFL::SpaceToDepthOp)

SpaceToDepth operator

Rearranges blocks of spatial data, into depth. More specifically, this op outputs a copy of the input tensor where values from the height and width dimensions are moved to the depth dimension. block_size indicates the input block size.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
block_size ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type values

tfl.sparse_to_dense (TFL::SparseToDenseOp)

Converts a sparse representation into a dense tensor.

Builds an array dense with shape output_shape such that

# If sparse_indices is scalar
dense[i] = (i == sparse_indices ? sparse_values : default_value)

# If sparse_indices is a vector, then for each i
dense[sparse_indices[i]] = sparse_values[i]

# If sparse_indices is an n by d matrix, then for each i in [0, n)
dense[sparse_indices[i][0], ..., sparse_indices[i][d-1]] = sparse_values[i]

All other values in dense are set to default_value . If sparse_values is a scalar, all sparse indices are set to this single value.

Indices should be sorted in lexicographic order, and indices must not contain any repeats. If validate_indices is true, these properties are checked during execution.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
sparse_indices tensor of 32/64-bit signless integer values
output_shape tensor of 32/64-bit signless integer values
sparse_values tensor of 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or QI8 type or 8-bit unsigned integer or QUI8 type or TFLite quint8 type or 32-bit float values
default_value tensor of 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or QI8 type or 8-bit unsigned integer or QUI8 type or TFLite quint8 type or 32-bit float values

نتایج:

نتیجه شرح
dense tensor of 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or QI8 type or 8-bit unsigned integer or QUI8 type or TFLite quint8 type or 32-bit float values

tfl.split (TFL::SplitOp)

Splits a tensor into num_split tensors along one dimension.

Splits the value tensor along split_dim into a number of sub-tensors with same shape as the original one, except for split_dim . Same as tf.Split.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
num_splits ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive

Operands:

عملوند شرح
split_dim tensor of 32-bit signless integer values
value tensor of 32-bit float or 16-bit signless integer or 32-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or QI16 type values

نتایج:

نتیجه شرح
outputs variadic of tensor of any type values

tfl.split_v (TFL::SplitVOp)

Splits a tensor into num_split tensors along one dimension.

Splits the value tensor along split_dim into a number of sub-tensors with same shape as the original one, except for split_dim . The grouping of the resultant sub-tensors is decided by size-splits . Same as tf.SplitV.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
num_splits ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive

Operands:

عملوند شرح
value tensor of 32-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or QI16 type values
size_splits 1D tensor of 32-bit signless integer values
split_dim 0D tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
outputs variadic of tensor of any type values

tfl.sqrt (TFL::SqrtOp)

Square root operator

Computes element-wise Square root of input

Traits: AlwaysSpeculatableImplTrait , InferTensorType , TF::SameOperandsAndResultTypeResolveRef

Interfaces: ConditionallySpeculatable , InferShapedTypeOpInterface , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float values

نتایج:

نتیجه شرح
y tensor of 32-bit float values

tfl.square (TFL::SquareOp)

Square operator

Computes element-wise Square of input

Traits: AlwaysSpeculatableImplTrait , InferTensorType , TF::SameOperandsAndResultTypeResolveRef

Interfaces: ConditionallySpeculatable , InferShapedTypeOpInterface , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
x tensor of 32-bit float values

نتایج:

نتیجه شرح
y tensor of 32-bit float values

tfl.squared_difference (TFL::SquaredDifferenceOp)

Squared difference operator

Element-wise squared difference operation.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , QuantizableResult , ResultsBroadcastableShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

عملوند شرح
lhs tensor of 32-bit float or 32-bit signless integer or QI8 type values
rhs tensor of 32-bit float or 32-bit signless integer or QI8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or QI8 type values

tfl.squeeze (TFL::SqueezeOp)

Removes dimensions of size 1 from the shape of a tensor.

Given a tensor input , this operation returns a tensor of the same type with all dimensions of size 1 removed. If you don't want to remove all size 1 dimensions, you can remove specific size 1 dimensions by specifying squeeze_dims .

مثلا:

# 't' is a tensor of shape [1, 2, 1, 3, 1, 1]
shape(squeeze(t)) ==> [2, 3]

Or, to remove specific size 1 dimensions:

# 't' is a tensor of shape [1, 2, 1, 3, 1, 1]
shape(squeeze(t, [2, 4])) ==> [1, 2, 3, 1]

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
squeeze_dims ::mlir::ArrayAttr 64-bit integer array attribute whose size is at most 8

Operands:

Operand شرح
input tensor of any type values

نتایج:

نتیجه شرح
output tensor of any type values

tfl.strided_slice (TFL::StridedSliceOp)

StridedSlice Op

Return a strided slice from input .

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
begin_mask ::mlir::IntegerAttr 32-bit signless integer attribute
end_mask ::mlir::IntegerAttr 32-bit signless integer attribute
ellipsis_mask ::mlir::IntegerAttr 32-bit signless integer attribute
new_axis_mask ::mlir::IntegerAttr 32-bit signless integer attribute
shrink_axis_mask ::mlir::IntegerAttr 32-bit signless integer attribute
offset ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or 32-bit unsigned integer or QI8 type or QUI8 type or 1-bit signless integer or 16-bit signless integer or QI16 type or TFLite quint8 type or TFLite string type values
begin tensor of 32-bit signless integer values
end tensor of 32-bit signless integer values
strides tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or 32-bit unsigned integer or QI8 type or QUI8 type or 1-bit signless integer or 16-bit signless integer or QI16 type or TFLite quint8 type or TFLite string type values

tfl.sub (TFL::SubOp)

عملگر تفریق

Element-wise subtraction operation.

Traits: ::mlir::OpTrait::TFLRuntimeOpTrait , AlwaysSpeculatableImplTrait , QuantizableResult , ResultsBroadcastableShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflArithmeticCountOpInterface , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
fused_activation_function ::mlir::StringAttr string attribute whose value is NONE, or RELU, or RELU_N1_TO_1, or RELU6, or TANH, or SIGN_BIT

Operands:

Operand شرح
lhs tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or QI16 type values
rhs tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or QI16 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or QI16 type values

tfl.sum (TFL::SumOp)

Sum operator

Computes the sum reduction along the specified axes

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
keep_dims ::mlir::BoolAttr bool attribute

Operands:

Operand شرح
input tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values
axes tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer or 64-bit signless integer or QI8 type or QUI8 type or TFLite quint8 type or QI16 type values

tfl.svdf (TFL::SVDFOp)

Single value decomposition filter operator

The SVDF op is a decomposition of a densely connected op into low rank filters. For details: https://research.google.com/pubs/pub43813.html https://arxiv.org/abs/1812.02802

Traits: QuantizableResult , quant::AccumulatorUniformScale<3, 2, 4>

Interfaces: DynamicRangeQuantizedOpInterface , TFL_StatefulOp , TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
rank ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive
fused_activation_function ::mlir::StringAttr string attribute whose value is NONE, or RELU, or RELU_N1_TO_1, or RELU6, or TANH, or SIGN_BIT
asymmetric_quantize_inputs ::mlir::BoolAttr bool attribute

Operands:

Operand شرح
input tensor of 32-bit float or QI8 type values
feature_weights tensor of 32-bit float or QI8 type or QUI8 type values
time_weights tensor of 32-bit float or QI16 type values
input_gate_bias tensor of any type values or none type
activation_state stateful tensor

نتایج:

نتیجه شرح
output tensor of 32-bit float or QI8 type values

tfl.tanh (TFL::TanhOp)

Hyperbolic tangent operator

Computes element-wise Hyperbolic tangent of input

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , FixedOutputRangeInterface , NoMemoryEffect (MemoryEffectOpInterface) , TflArithmeticCountOpInterface , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

نتایج:

نتیجه شرح
output tensor of 32-bit float or QI8 type or QUI8 type or QI16 type or TFLite quint8 type values

tfl.tile (TFL::TileOp)

Tile operator.

Constructs a tensor by tiling a given tensor.

This operation creates a new tensor by replicating input multiples times. The output tensor's i'th dimension has input.dims(i) * multiples[i] elements, and the values of input are replicated multiples[i] times along the 'i'th dimension. For example, tiling [abcd] by [2] produces [abcdabcd].

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or 1-bit signless integer or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite string type values
multiples tensor of 32/64-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 1-bit signless integer or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite string type values

tfl.topk_v2 (TFL::TopKV2Op)

TopK operator

Returns the top k largest element along each last dimensional slice of input and the indices of values within the last dimension of the input tensor.

Results are always sorted in the descending order.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type values
k tensor of 16-bit signless integer or 32-bit signless integer values

نتایج:

نتیجه شرح
values tensor of 32-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type values
indices tensor of 16-bit signless integer or 32-bit signless integer values

tfl.transpose (TFL::TransposeOp)

Transpose operator

Returns the Transpose of x

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit signless integer or 32-bit float or 8-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite quint8 type or 1-bit signless integer or 64-bit signless integer or QI16 type values
perm tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit signless integer or 32-bit float or 8-bit signless integer or 8-bit unsigned integer or QI8 type or QUI8 type or TFLite quint8 type or 1-bit signless integer or 64-bit signless integer or QI16 type values

tfl.transpose_conv (TFL::TransposeConvOp)

Transpose convolution operator

Performs transpose convolution operation on input.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , quant::AccumulatorUniformScale<3, 1, 2> , quant::AffineOpCoefficient<0, 1>

Interfaces: AffineQuantizedOpInterface , ConditionallySpeculatable , DynamicRangeQuantizedOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , TFL_SparseOp , TflArithmeticCountOpInterface , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
padding ::mlir::StringAttr string attribute whose value is SAME, or VALID
stride_h ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive
stride_w ::mlir::IntegerAttr 32-bit signless integer attribute whose value is positive
fused_activation_function ::mlir::StringAttr string attribute whose value is NONE, or RELU, or RELU_N1_TO_1, or RELU6, or TANH, or SIGN_BIT

Operands:

عملوند شرح
output_shape tensor of 32-bit signless integer values
weights tensor of 32-bit float or QI8 type or QUI8 type or QI16 type values
input tensor of 32-bit float or QI8 type or QUI8 type or QI16 type values
bias tensor of any type values or none type

نتایج:

نتیجه شرح
output tensor of 32-bit float or QI8 type or QUI8 type or QI16 type values

tfl.unidirectional_sequence_lstm (TFL::UnidirectionalSequenceLSTMOp)

Unidirectional sequence lstm operator

A recurrent neural network specified by an LSTM cell. This Op supports unrolling the input along the time or batch dimensions, and implements the following operation for each element in the sequence s = 1...sequence_length: outputs[s] = state = activation(LSTMOp(inputs[s]))

where LSTMOp is LSTM TF Lite Op and the “activation” is the function passed as the “fused_activation_function” argument (if not “NONE”).

Traits: QuantizableResult

Interfaces: DynamicRangeQuantizedOpInterface , InferTypeOpInterface , TFL_StatefulOp , TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
fused_activation_function ::mlir::StringAttr string attribute whose value is NONE, or RELU, or RELU_N1_TO_1, or RELU6, or TANH, or SIGN_BIT
cell_clip ::mlir::FloatAttr 32-bit float attribute whose value is non-negative
proj_clip ::mlir::FloatAttr 32-bit float attribute whose value is non-negative
time_major ::mlir::BoolAttr bool attribute
asymmetric_quantize_inputs ::mlir::BoolAttr bool attribute
diagonal_recurrent_tensors ::mlir::BoolAttr bool attribute
input_to_input_intermediate ::mlir::TypeAttr any type attribute
input_to_forget_intermediate ::mlir::TypeAttr any type attribute
input_to_cell_intermediate ::mlir::TypeAttr any type attribute
input_to_output_intermediate ::mlir::TypeAttr any type attribute
effective_hidden_scale_intermediate ::mlir::TypeAttr any type attribute

Operands:

Operand شرح
input tensor of 32-bit float values
input_to_input_weights tensor of any type values or none type
input_to_forget_weights tensor of 32-bit float or QI8 type values
input_to_cell_weights tensor of 32-bit float or QI8 type values
input_to_output_weights tensor of 32-bit float or QI8 type values
recurrent_to_input_weights tensor of any type values or none type
recurrent_to_forget_weights tensor of 32-bit float or QI8 type values
recurrent_to_cell_weights tensor of 32-bit float or QI8 type values
recurrent_to_output_weights tensor of 32-bit float or QI8 type values
cell_to_input_weights tensor of any type values or none type
cell_to_forget_weights tensor of any type values or none type
cell_to_output_weights tensor of any type values or none type
input_gate_bias tensor of any type values or none type
forget_gate_bias tensor of 32-bit float values
cell_bias tensor of 32-bit float values
output_gate_bias tensor of 32-bit float values
projection_weights tensor of any type values or none type
projection_bias tensor of any type values or none type
input_activation_state stateful tensor
input_cell_state stateful tensor
input_layer_norm_coefficients tensor of any type values or none type
forget_layer_norm_coefficients tensor of any type values or none type
cell_layer_norm_coefficients tensor of any type values or none type
output_layer_norm_coefficients tensor of any type values or none type

نتایج:

نتیجه شرح
output tensor of 32-bit float or QI8 type values

tfl.unidirectional_sequence_rnn (TFL::UnidirectionalSequenceRNNOp)

Unidirectional sequence rnn operator

A recurrent neural network specified by an RNN cell. This Op takes in input in a format {batch_size, seq_len, input_size} or {seq_len, batch_size, input_size} if it's time-majored.

It implements the following operation for each element in the sequence s = 1...sequence_length: outputs[s] = state = activation(RNNOp(inputs[s]))

where RNNOp is RNNOp TF Lite Op and the “activation” is the function passed as the “fused_activation_function” argument (if not “NONE”).

Traits: QuantizableResult

Interfaces: DynamicRangeQuantizedOpInterface , TFL_StatefulOp , TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
time_major ::mlir::BoolAttr bool attribute
fused_activation_function ::mlir::StringAttr string attribute whose value is NONE, or RELU, or RELU_N1_TO_1, or RELU6, or TANH, or SIGN_BIT
asymmetric_quantize_inputs ::mlir::BoolAttr bool attribute

Operands:

Operand شرح
input tensor of 32-bit float values
input_to_input_weights tensor of 32-bit float or QI8 type values
recurrent_to_input_weights tensor of 32-bit float or QI8 type values
input_gate_bias tensor of 32-bit float values
hidden_state stateful tensor

نتایج:

نتیجه شرح
output tensor of 32-bit float values

tfl.unique (TFL::UniqueOp)

Unique Op.

This operation returns a tensor output containing all of the unique elements of input sorted in the same order that they occur in input . This operation also returns a tensor idx the same size as x that contains the index of each value of input in the unique output output . به عبارت دیگر:

Traits: AlwaysSpeculatableImplTrait , QuantizableResult

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
idx_out_type ::mlir::Attribute derived attribute

Operands:

Operand شرح
input tensor of 8-bit signless integer or QI8 type or 8-bit unsigned integer or QUI8 type or 16-bit signless integer or QI16 type or 32-bit signless integer or 64-bit signless integer or 32-bit float values

نتایج:

نتیجه شرح
output tensor of 8-bit signless integer or QI8 type or 8-bit unsigned integer or QUI8 type or 16-bit signless integer or QI16 type or 32-bit signless integer or 64-bit signless integer or 32-bit float values
idx tensor of 32/64-bit signless integer values

tfl.unpack (TFL::UnpackOp)

Unpacks a tensor along a dimension into multiple tensors

Unpacks a given dimension of a rank- R tensor into num rank- (R-1) tensors.

Unpacks num tensors from value by chipping it along the axis dimension. For example, given a tensor of shape (A, B, C, D) ;

If axis == 0 then the i'th tensor in output is the slice value[i, :, :, :] and each tensor in output will have shape (B, C, D) . (Note that the dimension unpacked along is gone, unlike split ).

If axis == 1 then the i'th tensor in output is the slice value[:, i, :, :] and each tensor in output will have shape (A, C, D) . و غیره.

This is the opposite of pack .

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , SameOperandsAndResultElementType

Interfaces: ConditionallySpeculatable , InferTypeOpInterface , NoMemoryEffect (MemoryEffectOpInterface) , SameOperandsAndResultsScale , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

ویژگی های:

صفت MLIR Type شرح
num ::mlir::IntegerAttr 32-bit signless integer attribute whose value is non-negative
axis ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand شرح
input tensor of 32-bit float or 1-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or 32-bit signless integer or QI8 type or QUI8 type or 16-bit signless integer or QI16 type values

نتایج:

نتیجه شرح
outputs variadic of tensor of any type values

tfl.unsorted_segment_max (TFL::UnsortedSegmentMaxOp)

UnsortedSegmentMax operator

Computes the maximum value along segments of a tensor such that output[i] = max(data[j....]) where segment_ids[j...] = i if the maximum is empty for a given segment ID i, it outputs the smallest possible value for the specific numeric type, output[i] = numeric_limits::lowest(). Note the values of segment_ids are always validated to be less than num_segments and an error is thrown for out-of-bound indices.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or 32-bit signless integer values
segment_ids tensor of 32-bit signless integer values
num_segments tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer values

tfl.unsorted_segment_min (TFL::UnsortedSegmentMinOp)

UnsortedSegmentMin operator

Computes the minimum value along segments of a tensor such that output[i] = min(data[j....]) where segment_ids[j...] = i if the minimum is empty for a given segment ID i, it outputs the largest possible value for the specific numeric type, output[i] = numeric_limits::max(). Note the values of segment_ids are always validated to be less than num_segments and an error is thrown for out-of-bound indices.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or 32-bit signless integer values
segment_ids tensor of 32-bit signless integer values
num_segments tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer values

tfl.unsorted_segment_prod (TFL::UnsortedSegmentProdOp)

UnsortedSegmentProd operator

Computes the product along segments of a tensor.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or 32-bit signless integer values
segment_ids tensor of 32-bit signless integer values
num_segments tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer values

tfl.unsorted_segment_sum (TFL::UnsortedSegmentSumOp)

UnsortedSegmentSum operator

From a tensor segmentation, computes the output resulting from summing together elements mapped to the same segment_id. Ie output[i] is equal to the tensor sum of all elements from the input tensor mapped to segment_id i . If no tensors are mapped to a particular included segment_id, the output at that indice will be a zero tensor with the appropriate shape. Note the values of segment_ids are always validated to be less than num_segments and an error is thrown for out-of-bound indices

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 32-bit float or 32-bit signless integer values
segment_ids tensor of 32-bit signless integer values
num_segments tensor of 32-bit signless integer values

نتایج:

نتیجه شرح
output tensor of 32-bit float or 32-bit signless integer values

tfl.var_handle (TFL::VarHandleOp)

Returns a handle to a variable resource from its name.

Returns a handle for a variable resource from its name. container: the container this variable is placed in. shared_name: the name by which this variable is referred to.

Interfaces: TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
container ::mlir::StringAttr string attribute
shared_name ::mlir::StringAttr string attribute

نتایج:

نتیجه شرح
resource_handle tensor of resource values

tfl.where (TFL::WhereOp)

Returns locations of nonzero / true values in a tensor.

This operation returns the coordinates of true elements in condition . The coordinates are returned in a 2-D tensor where the first dimension (rows) represents the number of true elements, and the second dimension (columns) represents the coordinates of the true elements. Keep in mind, the shape of the output tensor can vary depending on how many true values there are in condition . Indices are output in row-major order.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
condition tensor of 1-bit signless integer or 32-bit float or 32/64-bit signless integer or 8-bit signless integer or 8-bit unsigned integer or 32-bit unsigned integer values

نتایج:

نتیجه شرح
index tensor of 64-bit signless integer values

tfl.while (TFL::WhileOp)

در حالی که حلقه

خروجی = ورودی; while (cond(output)) { output = body(output) }

While loop where all values are passes through arguments with implicit capture.

input: A list of input tensors whose types are T. output: A list of output tensors whose types are T. cond: A region that takes 'input' and returns a boolean scalar tensor. body: A region that takes a list of tensors and returns another list of tensors. Both lists have the same types.

Traits: SingleBlockImplicitTerminator<YieldOp> , SingleBlock

Interfaces: LoopLikeOpInterface , TflRuntimeVerifyOpInterface

ویژگی های:

صفت MLIR Type شرح
is_stateless ::mlir::BoolAttr bool attribute

Operands:

عملوند شرح
input variadic of tensor of any type values

نتایج:

نتیجه شرح
output variadic of tensor of any type values

tfl.yield (TFL::YieldOp)

Yield operation

The "yield" operation represents a return operation within the conditional and body of structured control flow (eg, while), and a terminator for ControlNodeOp. The operation takes a variable number of operands and produces no results. The operand number and types must match the signature of the region that contains the operation.

Traits: AlwaysSpeculatableImplTrait , QuantizableResult , Terminator

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
«unnamed» variadic of any type

tfl.zeros_like (TFL::ZerosLikeOp)

ZerosLike operator

Returns a tensor of zeros with the same shape and type as the input tensor.

Traits: AlwaysSpeculatableImplTrait , SameOperandsAndResultShape

Interfaces: ConditionallySpeculatable , NoMemoryEffect (MemoryEffectOpInterface) , TflRuntimeVerifyOpInterface

Effects: MemoryEffects::Effect{}

Operands:

Operand شرح
input tensor of 64-bit signless integer or 32-bit signless integer or 32-bit float values

نتایج:

نتیجه شرح
output tensor of 64-bit signless integer or 32-bit signless integer or 32-bit float values

ویژگی های

DimensionMetadataAttr

Dimension metadata.

نحو:

#tfl.dimension_metadata<
  ::mlir::TFL::DimensionTypeAttr,   # format
  int32_t,   # dense_size
  ::llvm::ArrayRef<int32_t>,   # segments
  ::llvm::ArrayRef<int32_t>   # indices
>

مولفه های:

پارامتر C++ type شرح
قالب ::mlir::TFL::DimensionTypeAttr dimension_type
dense_size int32_t
بخش ها ::llvm::ArrayRef<int32_t>
indices ::llvm::ArrayRef<int32_t>

SparsityParameterAttr

Sparsity parameter.

نحو:

#tfl.sparsity_parameter<
  ::llvm::ArrayRef<int32_t>,   # traversal_order
  ::llvm::ArrayRef<int32_t>,   # block_map
  ::llvm::ArrayRef<DimensionMetadataAttr>   # dim_metadata
>

مولفه های:

پارامتر C++ type شرح
traversal_order ::llvm::ArrayRef<int32_t>
block_map ::llvm::ArrayRef<int32_t>
dim_metadata ::llvm::ArrayRef<DimensionMetadataAttr>

ConstBytesAttr

A string attribute representation of compiled bytes

Syntax Examples:

#tfl<const_bytes : "0xDEADBEEF">

مولفه های:

پارامتر C++ type شرح
ارزش ::llvm::StringRef

DimensionTypeAttr

dimension_type

نحو:

#tfl.dimension_type_attr<
  ::mlir::TFL::DimensionType   # value
>

Enum cases:

  • DENSE ( DENSE )
  • SPARSE_CSR ( SPARSE_CSR ) #### Parameters:
پارامتر C++ type شرح
ارزش ::mlir::TFL::DimensionType an enum of type DimensionType

LSTMKernelTypeAttr

lstm_kernel_type

نحو:

#tfl.lstm_kernel_type_attr<
  ::mlir::TFL::LSTMKernelType   # value
>

Enum cases:

  • FULL ( FULL )
  • BASIC ( BASIC ) #### Parameters:
پارامتر C++ type شرح
ارزش ::mlir::TFL::LSTMKernelType an enum of type LSTMKernelType

MirrorPaddingTypeAttr

mirror_pad_enum

نحو:

#tfl.mirror_pad_attr<
  ::mlir::TFL::MirrorPaddingType   # value
>

Enum cases:

  • REFLECT ( REFLECT )
  • SYMMETRIC ( SYMMETRIC ) #### Parameters:
پارامتر C++ type شرح
ارزش ::mlir::TFL::MirrorPaddingType an enum of type MirrorPaddingType