Skip to content

Operators

The following symbolic operators are supported on layers:

Symbol Operator
+ add
- subtract
* multiply
/ division
// floor division
% mod
^ power
== equal
!= not equal
< less than
<= less than or equal
> greater than
>= greater than or equal
& logical and
| logical or

On a layer you can also invoke the following operations using layer.operator(...) syntax:

Operator
abs
ceil
clip
conv2d
exp
exp2
floor
isin
isnan
log
log10
log2
nan_to_num

You can also call the following methods on yirgacheffe.operators:

abs = LayerOperation.abs module-attribute

ceil = LayerOperation.ceil module-attribute

exp = LayerOperation.exp module-attribute

exp2 = LayerOperation.exp2 module-attribute

floor = LayerOperation.floor module-attribute

isin = LayerOperation.isin module-attribute

log = LayerOperation.log module-attribute

log10 = LayerOperation.log10 module-attribute

log2 = LayerOperation.log2 module-attribute

maximum = LayerOperation.maximum module-attribute

nan_to_num = LayerOperation.nan_to_num module-attribute

round = LayerOperation.round module-attribute

where = LayerOperation.where module-attribute