Skip to content

Implemented new layer 'Where'

Yucong Cai requested to merge Yucong/sadl:where into v8dev

This merge request introduces the Where layer with the following changes:

Add a new layer "Where" in sadl/Where.h, which preforms element-wise selection. Where supports two modes: normally apply,or apply with the input A and B being swapped when A is constant, controlled by the parameter m_mode.

sadl/layer.h, sadl/layers.h and sadl/model.h have been modified to support the new layer.

converter/ have been modified to support the convertion from onnx::Where to sadl::Where.

Test models have been added to utests/models directory. They have both layer where and layer compare. They are present at utests/models/where_less.onnx, where_greater, where_swap_less and where_swap_greater.

utests/ has been modified for the new utest models.

some samples have been modified to support the new layer.

Edited by Yucong Cai

Merge request reports