FilesLast commitLast update
4 months ago
4 months ago
4 months ago
1 month ago
4 months ago
9 months ago
24 days ago
18 days ago
README

Assert

English | 简体中文

Applicable Products

Product Support
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function

  • Operator function: asserts that the given condition is true. If the input tensor input_condition evaluates to false, the operator prints the tensor list in input_data.

Parameters

Parameter name Input/Output/Attribute Description Data type Data format
input_condition Input Input tensor, the condition to check. BOOL ND
input_data Input Dynamic input tensors (variable count), representing the set of tensors to print when the condition is false. FLOAT, FLOAT16, INT8, INT16, INT32, INT64, UINT8, UINT16, UINT32, UINT64, BOOL, DOUBLE, STRING ND
summarize Optional attribute • Optional integer that specifies printing the first summarize elements of each tensor.
• The default value is 3.
INT -

Constraints

  • input_condition must be a scalar (rank 0, with shape []); a one-dimensional single-element tensor with shape [1] does not meet the requirement.

Invocation Description

Invocation method Invocation sample Description
Graph-mode invocation test_geir_assert Invokes the Assert operator by building a graph through the operator IR.