ISO/IEC 15938-17:2022
(Main)Information technology — Multimedia content description interface — Part 17: Compression of neural networks for multimedia content description and analysis
Information technology — Multimedia content description interface — Part 17: Compression of neural networks for multimedia content description and analysis
This document specifies Neural Network Coding (NNC) as a compressed representation of the parameters/weights of a trained neural network and a decoding process for the compressed representation, complementing the description of the network topology in existing (exchange) formats for neural networks. It establishes a toolbox of compression methods, specifying (where applicable) the resulting elements of the compressed bitstream. This document does not specify a complete protocol for the transmission of neural networks, but focuses on compression of network parameters. Only the syntax format, semantics, associated decoding process requirements, parameter sparsification, parameter transformation methods, parameter quantization, entropy coding method and integration/signalling within existing exchange formats are specified, while other matters such as pre-processing, system signalling and multiplexing, data loss recovery and post-processing are considered to be outside the scope of this document. Additionally, the internal processing steps performed within a decoder are also considered to be outside the scope of this document; only the externally observable output behaviour is required to conform to the specifications of this document.
Technologies de l'information — Interface de description du contenu multimédia — Partie 17: Compression des réseaux neuronaux pour la description et l'analyse du contenu multimédia
General Information
- Status
- Withdrawn
- Publication Date
- 25-Aug-2022
- Current Stage
- 9599 - Withdrawal of International Standard
- Start Date
- 10-Jan-2024
- Completion Date
- 12-Feb-2026
Relations
- Effective Date
- 27-Aug-2022
Overview
ISO/IEC 15938-17:2022 defines a standardized approach to compressing neural network parameters used for multimedia content description and analysis. Part of the ISO/IEC 15938 family, this document specifies Neural Network Coding (NNC) as a compressed representation of trained network parameters/weights and the required decoding behaviour. It complements existing exchange formats by focusing on parameter compression, bitstream syntax/semantics and integration/signalling - not on full transmission protocols or internal decoder implementation details.
Key topics and technical requirements
- Neural Network Coding (NNC / NNR bitstream): Syntax and semantics for NNR units and aggregate bitstreams, including headers, payloads and byte alignment.
- Decoding process requirements: Externally observable decoding behaviour, supported decompressed data formats and method-specific decoding flows (integer, float, raw float, block types).
- Parameter reduction techniques: Sparsification (including micro-structured pruning), combined pruning/sparsification, parameter unification, low-rank and low-displacement-rank approaches for convolutions/fully connected layers, batchnorm folding, and local scaling adaptation.
- Parameter quantization methods: Uniform quantization, codebook-based quantization, and dependent scalar quantization - with associated syntax and semantics for signalling quantization metadata.
- Entropy coding and DeepCABAC: Entropy coding methods (including DeepCABAC) and the corresponding bitstream syntax, initialization, binarization and decoding processes.
- Integration with exchange formats: Guidance and normative/informative implementations for carrying NNR bitstreams with existing model exchange formats (Annex A: NNEF normative; Annexes B–D: ONNX, PyTorch, TensorFlow informative), and recommendations for container carriage.
- Scope limits: The standard intentionally excludes pre-/post-processing, system signalling, multiplexing, data loss recovery, and internal decoder processing steps - it mandates only the external bitstream syntax/semantics and decoder output behaviour.
Applications
- Reducing model size for on-device multimedia analysis (e.g., visual/audio metadata extraction)
- Efficient packaging of trained models for streaming, storage, and update distribution
- Standardized interchange of compressed models between toolchains and platforms
- Improving runtime efficiency and bandwidth use for content description services
Who should use this standard
- ML engineers optimizing models for multimedia tasks
- Codec and multimedia system developers integrating model delivery
- Device manufacturers and streaming platforms seeking interoperable compressed models
- Tool and library vendors implementing model export/import and compression pipelines
Related standards
- ISO/IEC 15938 (MPEG-7) family - multimedia content description interfaces
- Model exchange formats referenced in annexes: NNEF, ONNX, PyTorch, TensorFlow
Keywords: ISO/IEC 15938-17:2022, Neural Network Coding, NNC, NNR bitstream, neural network compression, model quantization, entropy coding, DeepCABAC, multimedia content description.
Get Certified
Connect with accredited certification bodies for this standard

BSI Group
BSI (British Standards Institution) is the business standards company that helps organizations make excellence a habit.

NYCE
Mexican standards and certification body.
Sponsored listings
Frequently Asked Questions
ISO/IEC 15938-17:2022 is a standard published by the International Organization for Standardization (ISO). Its full title is "Information technology — Multimedia content description interface — Part 17: Compression of neural networks for multimedia content description and analysis". This standard covers: This document specifies Neural Network Coding (NNC) as a compressed representation of the parameters/weights of a trained neural network and a decoding process for the compressed representation, complementing the description of the network topology in existing (exchange) formats for neural networks. It establishes a toolbox of compression methods, specifying (where applicable) the resulting elements of the compressed bitstream. This document does not specify a complete protocol for the transmission of neural networks, but focuses on compression of network parameters. Only the syntax format, semantics, associated decoding process requirements, parameter sparsification, parameter transformation methods, parameter quantization, entropy coding method and integration/signalling within existing exchange formats are specified, while other matters such as pre-processing, system signalling and multiplexing, data loss recovery and post-processing are considered to be outside the scope of this document. Additionally, the internal processing steps performed within a decoder are also considered to be outside the scope of this document; only the externally observable output behaviour is required to conform to the specifications of this document.
This document specifies Neural Network Coding (NNC) as a compressed representation of the parameters/weights of a trained neural network and a decoding process for the compressed representation, complementing the description of the network topology in existing (exchange) formats for neural networks. It establishes a toolbox of compression methods, specifying (where applicable) the resulting elements of the compressed bitstream. This document does not specify a complete protocol for the transmission of neural networks, but focuses on compression of network parameters. Only the syntax format, semantics, associated decoding process requirements, parameter sparsification, parameter transformation methods, parameter quantization, entropy coding method and integration/signalling within existing exchange formats are specified, while other matters such as pre-processing, system signalling and multiplexing, data loss recovery and post-processing are considered to be outside the scope of this document. Additionally, the internal processing steps performed within a decoder are also considered to be outside the scope of this document; only the externally observable output behaviour is required to conform to the specifications of this document.
ISO/IEC 15938-17:2022 is classified under the following ICS (International Classification for Standards) categories: 35.040.40 - Coding of audio, video, multimedia and hypermedia information. The ICS classification helps identify the subject area and facilitates finding related standards.
ISO/IEC 15938-17:2022 has the following relationships with other standards: It is inter standard links to ISO/IEC 15938-17:2024. Understanding these relationships helps ensure you are using the most current and applicable version of the standard.
ISO/IEC 15938-17:2022 is available in PDF format for immediate download after purchase. The document can be added to your cart and obtained through the secure checkout process. Digital delivery ensures instant access to the complete standard document.
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 15938-17
First edition
2022-08
Information technology — Multimedia
content description interface —
Part 17:
Compression of neural networks for
multimedia content description and
analysis
Technologies de l'information — Interface de description du contenu
multimédia —
Partie 17: Compression des réseaux neuronaux pour la description et
l'analyse du contenu multimédia
Reference number
© ISO/IEC 2022
© ISO/IEC 2022
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii
© ISO/IEC 2022 – All rights reserved
Contents Page
Foreword .v
Introduction . vi
1 Scope . 1
2 Normative references . 1
3 Terms and definitions . 1
4 Abbreviated terms, conventions and symbols . 2
4.1 General . 2
4.2 Abbreviated terms . 2
4.3 List of symbols . 3
4.4 Number formats and computation conventions . 5
4.5 Arithmetic operators . 5
4.6 Logical operators . 6
4.7 Relational operators . 6
4.8 Bit-wise operators . 6
4.9 Assignment operators . 7
4.10 Range notation . 7
4.11 Mathematical functions . 7
4.12 Array functions . 8
4.13 Order of operation precedence . 9
4.14 Variables, syntax elements and tables. 10
5 Overview .11
5.1 General . 11
5.2 Compression tools . 11
5.3 Creating encoding pipelines .12
6 Syntax and semantics .13
6.1 Specification of syntax and semantics . 13
6.1.1 Method of specifying syntax in tabular form .13
6.1.2 Bit ordering . 14
6.1.3 Specification of syntax functions and data types . 14
6.1.4 Semantics . 16
6.2 General bitstream syntax elements . 17
6.2.1 NNR unit . . 17
6.2.2 Aggregate NNR unit . 17
6.2.3 Composition of NNR bitstream . 18
6.3 NNR bitstream syntax . 18
6.3.1 NNR unit syntax . 18
6.3.2 NNR unit size syntax. 19
6.3.3 NNR unit header syntax . 19
6.3.4 NNR unit payload syntax . 24
6.3.5 Byte alignment syntax .29
6.4 Semantics . 29
6.4.1 General .29
6.4.2 NNR unit size semantics .29
6.4.3 NNR unit header semantics .29
6.4.4 NNR unit payload semantics .36
7 Decoding process .41
7.1 General . 41
7.2 NNR decompressed data formats . 42
7.3 Decoding methods . 42
7.3.1 General . 42
7.3.2 Decoding method for NNR compressed payloads of type NNR_PT_INT . 43
7.3.3 Decoding method for NNR compressed payloads of type NNR_PT_FLOAT . 43
iii
© ISO/IEC 2022 – All rights reserved
7.3.4 Decoding method for NNR compressed payloads of type NNR_PT_RAW_
FLOAT . 43
7.3.5 Decoding method for NNR compressed payloads of type NNR_PT_BLOCK . 43
7.3.6 Decoding process for an integer weight tensor . 45
8 Parameter reduction .46
8.1 General .46
8.2 Methods .46
8.2.1 Sparsification using compressibility loss .46
8.2.2 Sparsification using micro-structured pruning .46
8.2.3 Combined pruning and sparsification . 47
8.2.4 Parameter unification.49
8.2.5 Low rank/low displacement rank for convolutional and fully connected
layers . 50
8.2.6 Batchnorm folding .50
8.2.7 Local scaling adaptation . 51
8.3 Syntax and semantics . 52
8.3.1 Sparsification using compressibility loss . 52
8.3.2 Sparsification using micro-structured pruning . 52
8.3.3 Combined pruning and sparsification . 52
8.3.4 Weight unification .53
8.3.5 Low rank/low displacement rank for convolutional and fully connected
layers . 53
8.3.6 Batchnorm folding .53
8.3.7 Local scaling .54
9 Parameter quantization .54
9.1 Methods .54
9.1.1 Uniform quantization method.54
9.1.2 Codebook-based method .54
9.1.3 Dependent scalar quantization method .54
9.2 Syntax and semantics .54
9.2.1 Uniform quantization method.54
9.2.2 Codebook-based method . 55
9.2.3 Dependent scalar quantization method . 55
10 Entropy coding .55
10.1 Methods . 55
10.1.1 DeepCABAC . 55
10.2 Syntax and semantics . 56
10.2.1 DeepCABAC syntax .56
10.3 Entropy decoding process . 59
10.3.1 General . 59
10.3.2 Initialization process .60
10.3.3 Binarization process . 61
10.3.4 Decoding process flow . 61
Annex A (normative) Implementation for NNEF .67
Annex B (informative) Implementation for ONNX® .69
Annex C (informative) Implementation for PyTorch® .71
Annex D (informative) Implementation for TensorFlow® .73
Annex E (informative) Recommendation for carriage of NNR bitstreams in other containers .75
Bibliography .77
iv
© ISO/IEC 2022 – All rights reserved
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are
members of ISO or IEC participate in the development of International Standards through technical
committees established by the respective organization to deal with particular fields of technical
activity. ISO and IEC technical committees collaborate in fields of mutual interest. Other international
organizations, governmental and non-governmental, in liaison with ISO and IEC, also take part in the
work.
The procedures used to develop this document and those intended for its further maintenance
are described in the ISO/IEC Directives, Part 1. In particular, the different approval criteria
needed for the different types of document should be noted. This document was drafted in
accordance with the editorial rules of the ISO/IEC Directives, Part 2 (see www.iso.org/directives or
www.iec.ch/members_experts/refdocs).
Attention is drawn to the possibility that some of the elements of this document may be the subject
of patent rights. ISO and IEC shall not be held responsible for identifying any or all such patent
rights. Details of any patent rights identified during the development of the document will be in the
Introduction and/or on the ISO list of patent declarations received (see www.iso.org/patents) or the IEC
list of patent declarations received (see https://patents.iec.ch).
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and
expressions related to conformity assessment, as well as information about ISO's adherence to
the World Trade Organization (WTO) principles in the Technical Barriers to Trade (TBT) see
www.iso.org/iso/foreword.html. In the IEC, see www.iec.ch/understanding-standards.
This document was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 29, Coding of audio, picture, multimedia and hypermedia information.
A list of all parts in the ISO/IEC 15938 series can be found on the ISO website and IEC websites.
Any feedback or questions on this document should be directed to the user’s national standards
body. A complete listing of these bodies can be found at www.iso.org/members.html and
www.iec.ch/national-committees.
v
© ISO/IEC 2022 – All rights reserved
Introduction
Artificial neural networks have been adopted for a broad range of tasks in multimedia analysis and
processing, media coding, data analytics and many other fields. Their recent success is based on the
feasibility of processing much larger and complex neural networks (deep neural networks, DNNs)
than in the past, and the availability of large-scale training data sets. As a consequence, trained neural
networks contain a large number of parameters and weights, resulting in a quite large size (e.g. several
hundred MBs). Many applications require the deployment of a particular trained network instance,
potentially to a larger number of devices, which may have limitations in terms of processing power and
memory (e.g. mobile devices or smart cameras), and also in terms of communication bandwidth. Any
use case, in which a trained neural network (or its updates) needs to be deployed to a number of devices
thus benefits from a standard for the compressed representation of neural networks.
Considering the fact that compression of neural networks is likely to have a hardware dependent and
hardware independent component, this document is designed as a toolbox of compression technologies.
Some of these technologies require specific representations in an exchange format (i.e. sparse
representations, adaptive quantization), and thus a normative specification for representing outputs
of these technologies is defined. Others do not at all materialize in a serialized representation (e.g.
pruning), however, also for the latter ones required metadata is specified. This document is independent
of a particular neural network exchange format, and interoperability with common formats is described
in the annexes.
This document thus defines a high-level syntax that specifies required metadata elements and related
semantics. In cases where the structure of binary data is to be specified (e.g. decomposed matrices) this
document also specifies the actual bitstream syntax of the respective block. Annexes to the document
specify the requirements and constraints of compressed neural network representations; as defined in
this document; and how they are applied.
— Annex A specifies the implementation of this document with the Neural Network Exchange Format
1)
(NNEF ), defining the use of NNEF to represent network topologies in a compressed neural network
bitstream.
— Annex B provides recommendations for the implementation of this document with the Open Neural
2)
Network Exchange Format (ONNX®) , defining the use of ONNX to represent network topologies in
a compressed neural network bitstream.
3)
— Annex C provides recommendations for the implementation of this document with the PyTorch®
format, defining the reference to PyTorch elements in the network topology description of a
compressed neural network bitstream.
4)
— Annex D provides recommendations for the implementation of this document with the Tensorflow®
format, defining the reference to Tensorflow elements in the network topology description of a
compressed neural network bitstream.
— Annex E provides recommendations for the carriage of tensors compressed according to this
document in third party container formats.
The compression tools described in this document have been selected and evaluated for neural
networks used in applications for multimedia description, analysis and processing. However, they may
1) NNEF is the trademark of a product owned by The Khronos® Group. This information is given for the convenience
of users of this document and does not constitute an endorsement by ISO/IEC of the product named.
2) ONNX is the trademark of a product owned by LF PROJECTS, LLC. This information is given for the convenience
of users of this document and does not constitute an endorsement by ISO/IEC of the product named.
3) PyTorch is the trademark of a product supplied by Facebook, Inc. This information is given for the convenience
of users of this document and does not constitute an endorsement by ISO/IEC of the product named.
4) TensorFlow is the trademark of a product supplied by Google LLC. This information is given for the convenience
of users of this document and does not constitute an endorsement by ISO/IEC of the product named.
vi
© ISO/IEC 2022 – All rights reserved
be useful for the compression of neural networks used in other applications and applied to other types
of data.
The International Organization for Standardization (ISO) and International Electrotechnical
Commission (IEC) draw attention to the fact that it is claimed that compliance with this document may
involve the use of patents.
ISO and IEC take no position concerning the evidence, validity and scope of this patent right.
The holder of this patent right has assured ISO and IEC that he/she is willing to negotiate licences under
reasonable and non-discriminatory terms and conditions with applicants throughout the world. In this
respect, the statement of the holder of this patent right is registered with ISO and IEC. Information may
be obtained from the patent database available at www.iso.org/patents.
Attention is drawn to the possibility that some of the elements of this document may be the subject
of patent rights other than those in the patent database. ISO and IEC shall not be held responsible for
identifying any or all such patent rights.
vii
© ISO/IEC 2022 – All rights reserved
INTERNATIONAL STANDARD ISO/IEC 15938-17:2022(E)
Information technology — Multimedia content description
interface —
Part 17:
Compression of neural networks for multimedia content
description and analysis
1 Scope
This document specifies Neural Network Coding (NNC) as a compressed representation of the
parameters/weights of a trained neural network and a decoding process for the compressed
representation, complementing the description of the network topology in existing (exchange) formats
for neural networks. It establishes a toolbox of compression methods, specifying (where applicable) the
resulting elements of the compressed bitstream.
This document does not specify a complete protocol for the transmission of neural networks, but
focuses on compression of network parameters. Only the syntax format, semantics, associated decoding
process requirements, parameter sparsification, parameter transformation methods, parameter
quantization, entropy coding method and integration/signalling within existing exchange formats are
specified, while other matters such as pre-processing, system signalling and multiplexing, data loss
recovery and post-processing are considered to be outside the scope of this document. Additionally, the
internal processing steps performed within a decoder are also considered to be outside the scope of this
document; only the externally observable output behaviour is required to conform to the specifications
of this document.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content
constitutes requirements of this document. For dated references, only the edition cited applies. For
undated references, the latest edition of the referenced document (including any amendments) applies.
ISO/IEC 10646, Information technology — Universal coded character set (UCS)
ISO/IEC 60559, Information technology — Microprocessor Systems — Floating-Point arithmetic
IETF RFC 1950, ZLIB Compressed Data Format Specification version 3.3, 1996
NNEF-v1.0.3, Neural Network Exchange Format, The Khronos NNEF Working Group, Version 1.0.3,
2020-06-12 (https:// www .khronos .org/ registry/ NNEF/ specs/ 1 .0/ nnef -1 .0 .3 .pdf)
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply.
ISO and IEC maintain terminology databases for use in standardization at the following addresses:
— ISO Online browsing platform: available at https:// www .iso .org/ obp
— IEC Electropedia: available at https:// www .electropedia .org/
© ISO/IEC 2022 – All rights reserved
3.1
aggregate NNR unit
NNR unit which carries multiple NNR units in its payload
3.2
compressed neural network representation
representation of a neural network with model parameters encoded using compression tools
3.3
decomposition
transformation to express a tensor as product of two tensors
3.4
hyperparameter
parameter whose value is used to control the learning process
3.5
layer
collection of nodes operating together at a specific depth within a neural network
3.6
model parameter
coefficients of the neural network model such as weights and biases
3.7
NNR unit
data structure for carrying (compressed or uncompressed) neural network data and related metadata
3.8
pruning
reduction of parameters in (a part of) the neural network
3.9
sparsification
increase of the number of zero-valued entries of a tensor
3.10
tensor
multidimensional structure grouping related model parameters
4 Abbreviated terms, conventions and symbols
4.1 General
This subclause contains the definition of operators, notations, functions, textual conventions and
processes used throughout this document.
The mathematical operators used in this document are similar to those used in the C programming
language. However, the results of integer division and arithmetic shift operations are specified more
precisely, and additional operations are specified, such as exponentiation and real-valued division.
Numbering and counting conventions generally begin from 0, e.g. "the first" is equivalent to the 0-th,
"the second" is equivalent to the 1-th, etc.
4.2 Abbreviated terms
DeepCABAC Context-adaptive binary arithmetic coding for deep neural networks
LDR Low displacement rank
© ISO/IEC 2022 – All rights reserved
LPS Layer parameter set
LR Low-rank
LSB Least significant bit
MPS Model parameter set
MSB Most significant bit
NN Neural network
NNEF Neural network exchange format
NNC Neural network coding
NNR Compressed neural network representation
SVD Singular value decomposition
4.3 List of symbols
This document defines the following symbols:
A
Input tensor
B
Output tensor
k
Block in superblock j of layer k
B
jl
b
Bias parameter
C Number of input channels of a convolutional layer
i
C Number of output channels of a convolutional layer
o
k
Number of channels of tensor in dimension j and in layer k
c
j
k '
Derived number of channels of tensor in dimension j and in layer k
c
j
k
Depth dimension of tensor at layer k
d
j
e
Parameter of f-circulant matrix Z
e
F
Parameter tensor of a convolutional layer
f
Parameter of f-circulant matrix Zf
G Left-hand side matrix of Low Rank decomposed representation of matrix W
k k
H Right-hand side matrix of Low Rank decomposed representation of matrix W
k k
k
Height dimension of tensor for layer k
h
j
K
Dimension of a convolutional kernel
L
Loss function
L Compressibility loss
c
© ISO/IEC 2022 – All rights reserved
L Diversity loss
d
L
Task loss
s
L Training loss
t
M
Feature matrix
M Pruning mask for layer k
k
m
Sparsification hyperparameter
i-th row of feature matrix M
m
i
k
Kernel size of tensor at layer k
n
j
k k
n Dimension resulting a product of n
j
P
Stochastic transition matrix
p
Pruning ratio hyperparameter
Elements of transition matrix P
p
ij
q
Sparsification ratio hyperparameter
S
Importance of parameters for pruning
k
Superblock in layer k
S
j
s
Local scaling factors
k
Size of superblock in layer k
s
j
u
Unification ratio hyperparameter
W
Parameter tensor
W Weight tensor of l-th layer
l
Parameter tensor of layer k
W
k
ˆ
Low Rank approximation of W
W
k
k
w
Parameter vector
k
Width dimension of tensor for layer k.
v
j
w Vector of weights for the i-th filter in the l-th layer
li,
w ' Vector of normalized weights for the i-th filter in the l-th layer
li,
X
Input to a batch-normalization layer
Z f-circulant matrix
e
Z f-circulant matrix
f
α
Folded batch normalization parameter
© ISO/IEC 2022 – All rights reserved
α '
Combined value for folded batch normalization parameter and local scaling factors
β
Batch normalization parameter
γ Compressibility loss multiplier
c
γ
Batch normalization parameter
δ
Folded batch normalization parameter
Scalar close to zero to avoid division by zero in batch normalization
λ
Eigenvector
λ Compressibility loss weight
c
λ Diversity loss weight
d
μ
Batch normalization parameter
π
Equilibrium probability of P
τ
Sparsification pruning threshold
ϕ
Smoothing factor
4.4 Number formats and computation conventions
This document defines the following number formats:
integer Integer number which may be arbitrarily small or large. Integers are also referred to
as signed integers.
unsigned integer Unsigned integer that may be zero or arbitrarily large.
float Floating point number according to ISO/IEC 60559.
If not specified otherwise, outcomes of all operators and mathematical functions are mathematically
exact. Whenever an outcome shall be a float, it is explicitly specified.
4.5 Arithmetic operators
The following arithmetic operators are defined:
+ Addition
− Subtraction (as a two-argument operator) or negation (as a unary prefix operator)
* Multiplication, including matrix multiplication
Element-wise multiplication of two transposed vectors or element-wise multiplication
of a transposed vector with rows of a matrix or Hadamard product of two matrices
with identical dimensions
y
x Exponentiation. Specifies x to the power of y. In other contexts, such notation is used
for superscripting not intended for interpretation as exponentiation.
/ Integer division with truncation of the result toward zero. For example, 7 / 4 and −7
/ −4 are truncated to 1 and −7 / 4 and 7 / −4 are truncated to −1.
© ISO/IEC 2022 – All rights reserved
÷ Used to denote division in mathematical equations where no truncation or rounding
is intended.
x Used to denote division in mathematical equations where no truncation or rounding is
intended, including element-wise division of two transposed vectors or element-wise
y
division of a transposed vector with rows of a matrix.
y
The summation of f( i ) with i taking all integer values from x up to and including y.
fi()
∑
ix=
y
The product of f( i ) with i taking all integer values from x up to and including y.
fi
()
∏
ix=
x % y Modulus. Remainder of x divided by y, defined only for integers x and y with x ≥ 0 and
y > 0.
4.6 Logical operators
The following logical operators are defined:
x && y Boolean logical "and" of x and y
x || y Boolean logical "or" of x and y
! Boolean logical "not"
x ? y : z If x is TRUE or not equal to 0, evaluates to the value of y; otherwise, evaluates to the
value of z.
4.7 Relational operators
The following relational operators are defined as follows:
> Greater than
≥ Greater than or equal to
< Less than
≤ Less than or equal to
== Equal to
!= Not equal to
When a relational operator is applied to a syntax element or variable that has been assigned the value
"na" (not applicable), the value "na" is treated as a distinct value for the syntax element or variable. The
value "na" is considered not to be equal to any other value.
4.8 Bit-wise operators
The following bit-wise operators are defined as follows:
& Bit-wise "and". When operating on integer arguments, operates on a two's complement
representation of the integer value. When operating on a binary argument that contains
fewer bits than another argument, the shorter argument is extended by adding more
significant bits equal to 0.
© ISO/IEC 2022 – All rights reserved
| Bit-wise "or". When operating on integer arguments, operates on a two's complement
representation of the integer value. When operating on a binary argument that contains
fewer bits than another argument, the shorter argument is extended by adding more
significant bits equal to 0.
^ Bit-wise "exclusive or". When operating on integer arguments, operates on a two's
complement representation of the integer value. When operating on a binary argument
that contains fewer bits than another argument, the shorter argument is extended by
adding more significant bits equal to 0.
x >> y Arithmetic right shift of a two's complement integer representation of x by y binary
digits. This function is defined only for non-negative integer values of y. Bits shifted
into the MSBs as a result of the right shift have a value equal to the MSB of x prior to
the shift operation.
x << y Arithmetic left shift of a two's complement integer representation of x by y binary digits.
This function is defined only for non-negative integer values of y. Bits shifted into the
LSBs as a result of the left shift have a value equal to 0.
! Bit-wise not operator returning 1 if applied to 0 and 0 if applied to 1.
4.9 Assignment operators
The following arithmetic operators are defined as follows:
= Assignment operator
++ Increment, i.e., x++ is equivalent to x = x + 1; when used in an array index, evaluates to
the value of the variable prior to the increment operation.
−− Decrement, i.e., x−− is equivalent to x = x − 1; when used in an array index, evaluates
to the value of the variable prior to the decrement operation.
+= Increment by amount specified, i.e., x += 3 is equivalent to x = x + 3, and x += (−3) is
equivalent to x = x + (−3).
−= Decrement by amount specified, i.e., x −= 3 is equivalent to x = x − 3, and x −= (−3) is
equivalent to x = x − (−3).
4.10 Range notation
The following notation is used to specify a range of values:
x = y.z x takes on integer values starting from y to z, inclusive, with x, y, and z being integer
numbers and z being greater than y.
array[x, y] a sub-array containing the elements of array comprised between position x and y in-
cluded. If x is greater than y, the resulting sub-array is empty.
4.11 Mathematical functions
The following mathematical functions are defined:
Ceil( x ) the smallest integer greater than or equal to x
Floor( x ) the largest integer less than or equal to x
Log2( x ) the base-2 logarithm of x
© ISO/IEC 2022 – All rights reserved
x ; x ≤ y
Minx(), y =
y ; x > y
x ; x ≥ y
Maxx, y =
()
y ; x < y
4.12 Array functions
Size( arrayName[] ) returns the number of elements contained in the array or tensor named arrayName.
If arrayName[] is a tensor this corresponds to the product of all dimensions of the tensor.
Prod( arrayName[] ) returns the product of all elements of array arrayName[].
TensorReshape( arrayName[], tensorDimension[]) returns the reshaped tensor array_name[] with the
specified tensorDimension[], without changing its data.
IndexToXY(w, h, i, bs) returns an array with two elements. The first element is an x coordinate and the
second element is a y coordinate pointing into a 2D array of width w and height h. x and y point to the
position that corresponds to scan index i when the block is scanned in blocks of size bs times bs. x and y
are derived as follows:
A variable fullRowOfBlocks is set to w * bs
A variable blockY is set to i / fullRowOfBlocks
A variable iOff is set to i % fullRowOfBlocks
A variable currBlockH is set to Min( bs, h − blockY * bs)
A variable fullBlocks is set to bs * currBlockH
A variable blockX is set to iOff / fullBlocks
A variable blockOff is set to iOff % fullBlocks
A variable currBlockW is set to Min( bs, w − blockX * bs)
A variable posX is set to blockOff % currBlockW
A variable posY is set to blockOff / currBlockW
The variable x is set to blockX * bs + posX
The variable y is set to blockY * bs + posY
TensorIndex( tensorDimensions[], i, scan ) returns an array with the same number of dimensions as
tensorDimensions[] where the elements of the array are set to integer values so that the array can be
used as an index pointing to an element of a tensor with dimensions tensorDimensions[] as follows:
If variable scan is equal to 0:
The returned array points to the i-th element in row-major scan order of a tensor with
dimensions tensorDimensions[].
If variable scan is greater than 0:
A variable bs is set to 4 << scan_order.
A variable h is set to tensorDimensions[0].
A variable w is set to Prod(tensorDimensions) / h.
© ISO/IEC 2022 – All rights reserved
Two variables x and y are set to the first and second element of the array that is returned by
calling IndexToXY(w, h, i, bs), respectively.
The returned array is TensorIndex(tensorDimensions, y * w + x, 0 ).
NOTE Variable scan usually corresponds to syntax element scan_order.
GetEntryPointIdx( tensorDimensions[], i, scan ) returns -1 if index i doesn’t point to the first position of
an entry point. If index i points to the first position of an entry point, it returns the entry point index
within the tensor. To determine the positions and indexes of entry points, the following applies:
A variable w is set to Prod(tensorDimensions) / tensorDimensions[0].
A variable epIdx is set to i / (w * (4 << scan)) – 1.
If i > 0 and i % (w * (4 << scan)) is equal to 0, index i points to the first position of an entry point and
the entry point index is equal to epIdx.
Otherwise, index i doesn’t point to the first position of an entry point.
AxisSwap( inputTensor[], tensorDimensions[], numberOfDimensions, axis0, axis1 ) returns a tensor
which is derived from inputTensor (with dimensions tensorDimensions and number of dimensions
as numberOfDimensions) and where values in the axis indexes axis0 and axis1 of the inputTensor are
swapped.
TensorSplit( inputTensor[], splitIndices, splitAxis ) returns an array of tensors subTensors that is derived
by splitting tensor inputTensor into N = Size(splitIndices) + 1 tensors using the provided array of indices
splitIndices along the provided axis splitAxis as follows:
An array inputDims is set to the dimensions of tensor inputTensor.
An element with value 0 is inserted into splitIndices before the first element and an element with
value inputDims[splitAxis] is inserted into splitIndices after the last element.
Ten
...




Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.
Loading comments...