Deprecate nGraph v0 ops and builders (#1856)
[platform/upstream/dldt.git] / ngraph / core / src / op / stop_gradient.cpp
1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //*****************************************************************************
16
17 #include "ngraph/op/stop_gradient.hpp"
18 #include "ngraph/op/broadcast.hpp"
19
20 NGRAPH_SUPPRESS_DEPRECATED_START
21
22 using namespace std;
23 using namespace ngraph;
24
25 constexpr NodeTypeInfo op::StopGradient::type_info;
26
27 op::StopGradient::StopGradient(const Output<Node>& arg)
28     : UnaryElementwiseArithmetic(arg)
29 {
30     constructor_validate_and_infer_types();
31 }
32
33 shared_ptr<Node> op::StopGradient::clone_with_new_inputs(const OutputVector& new_args) const
34 {
35     check_new_args_count(this, new_args);
36     return make_shared<StopGradient>(new_args.at(0));
37 }