Class ov::pass::SoftmaxFusion¶
-
class SoftmaxFusion : public ov::pass::MatcherPass¶
SoftmaxFusion transformation replaces following graphs:
and +—————+ │ │ │ input │ │ │ +—————++---------------+ │ │ │ input │ │ │ +---------------+ │ │ │ v │ +-----------+ │ │ │ │ │ ReduceMax │ │ │ │ │ +-----------+ │ │ │ │ v v +---------------+ │ │ │ Sub │ │ │ +---------------+ | | v +---------------+ │ │ │ Exp │ │ │ +---------------+ │ │ │ v │ +-----------+ │ │ │ │ │ ReduceSum │ │ │ │ │ +-----------+ │ │ │ │ v v +-------------+ | │ | Div │ │ │ +-------------+
to a single Softmax node
Restrictions:
ReduceMax and ReduceSum axes must be scalar constants and they have to point to the same axis