1 //*****************************************************************************
2 // Copyright 2017-2020 Intel Corporation
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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 //*****************************************************************************
17 #include "ngraph/op/stop_gradient.hpp"
18 #include "ngraph/op/broadcast.hpp"
20 NGRAPH_SUPPRESS_DEPRECATED_START
23 using namespace ngraph;
25 constexpr NodeTypeInfo op::StopGradient::type_info;
27 op::StopGradient::StopGradient(const Output<Node>& arg)
28 : UnaryElementwiseArithmetic(arg)
30 constructor_validate_and_infer_types();
33 shared_ptr<Node> op::StopGradient::clone_with_new_inputs(const OutputVector& new_args) const
35 check_new_args_count(this, new_args);
36 return make_shared<StopGradient>(new_args.at(0));