forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
inference-engine/src/transformations/include/transformations/low_precision/split.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include <vector> | ||
|
||
#include "layer_transformation.hpp" | ||
#include "ngraph/node.hpp" | ||
|
||
namespace ngraph { | ||
namespace pass { | ||
namespace low_precision { | ||
|
||
class TRANSFORMATIONS_API SplitTransformation : public LayerTransformation { | ||
public: | ||
SplitTransformation(const Params& params); | ||
void registerMatcherIn(GraphRewrite& pass, TransformationContext& context) const override; | ||
void transform(TransformationContext& context, ngraph::pattern::Matcher& m) const override; | ||
bool isPrecisionPreserved(std::shared_ptr<Node> layer) const noexcept override; | ||
void updateOutputs( | ||
TransformationContext& context, | ||
std::vector<std::shared_ptr<ngraph::Node>> lastNodes, | ||
std::shared_ptr<ngraph::Node> originalNode) const; | ||
protected: | ||
ngraph::Shape getConstSplitShape( | ||
const std::vector<size_t>& constSplitLengths, | ||
const ngraph::Shape& constShape, const size_t axis, | ||
const size_t idx) const; | ||
virtual std::vector<size_t> getConstSplitLengths( | ||
const OutputVector& inputs, | ||
const ngraph::Shape& constShape, | ||
const size_t outputSize) const; | ||
}; | ||
} // namespace low_precision | ||
} // namespace pass | ||
} // namespace ngraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters