I have some questions about Table 1 expression operators that I would like to clarify. The spec says:
Arithmetic operators that are applicable to scalar are also applicable to integer arguments (but not
mixed), in which case the result is also an integer. Comparison operators that are applicable to any
primitive type (marked by ? below just like generic types) must have arguments of the same type.
and also:
All operators are also applicable to tensors, hence they are not listed here explicitly.
In this case, the result is also a tensor (of the appropriate data-type). If at least one of the arguments
is a tensor, the operation is mapped to the appropriate fragment. In this case, argument types must
be checked in the same way as if the fragment was explicitly called.
Since the corresponding unary and binary fragment operations are not defined in NNEF for integer tensors, and since the eq and ne fragments are not defined for generic tensor types, my understanding of what Table 1 would look like with all explicit options included is this:
There are no corresponding operations on integer tensors as there are for primitive integers
For tensors, the == and != operators map only to the eq and ne fragments that are defined for scalar tensor arguments, while for primitives, the == and != operators map to any matching primitive type arguments
For tensors, the unary + operator maps only to the instance of copy<scalar>, i.e., to scalar tensor input, not any generic tensor type
Happy New Year, everyone!
I have some questions about Table 1 expression operators that I would like to clarify. The spec says:
and also:
Since the corresponding unary and binary fragment operations are not defined in NNEF for integer tensors, and since the
eq
andne
fragments are not defined for generic tensor types, my understanding of what Table 1 would look like with all explicit options included is this:nnef-tables.pdf
Specifically:
==
and!=
operators map only to theeq
andne
fragments that are defined for scalar tensor arguments, while for primitives, the==
and!=
operators map to any matching primitive type arguments+
operator maps only to the instance ofcopy<scalar>
, i.e., to scalar tensor input, not any generic tensor typeDoes this seem right?