ngraph::pass::DepthToSpaceFusion Class Reference

DepthToSpaceFusion transformation detects Reshape-Transpose-Reshape pattern and tries to fuse it into a single DepthToSpace layer. More...

#include <depth_to_space_fusion.hpp>

Inheritance diagram for ngraph::pass::DepthToSpaceFusion:

Detailed Description

DepthToSpaceFusion transformation detects Reshape-Transpose-Reshape pattern and tries to fuse it into a single DepthToSpace layer.

DepthToSpaceFusion transformation is optional and disabled by default. The transformation can be enabled with callback using setCallback method. See the example below.

Callback example:

// This callback enables DepthToSpaceFusion transformation
auto callback = [](const std::shared_ptr<const ngraph::Node> & node) -> bool {
    return std::dynamic_pointer_cast<const ngraph::opset3::DepthToSpace>(node) != nullptr;
};

auto p = ngraph::pass::DepthToSpaceFusion();
p.setCallback(callback);
p.run_on_function(f);

The documentation for this class was generated from the following file: