2 // Copyright (c) 2018 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.
17 ///////////////////////////////////////////////////////////////////////////////////////////////////
19 #include "primitive.hpp"
23 /// @addtogroup cpp_api C++ API
25 /// @addtogroup cpp_topology Network Topology
27 /// @addtogroup cpp_primitives Primitives
30 /// @brief Performs backward fully connected layer (inner product) for input.
31 struct fully_connected_grad_input : public primitive_base<fully_connected_grad_input> {
32 CLDNN_DECLARE_PRIMITIVE(fully_connected_grad_input)
34 /// @brief Constructs fully connected layer grad for input.
35 /// @param id This primitive id.
36 /// @param input_grad Input gradient primitive id.
37 /// @param input Input primitive id.
38 /// @param weights Primitive id containing weights data.
39 fully_connected_grad_input(
40 const primitive_id& id,
41 const primitive_id& input_grad,
42 const primitive_id& input,
43 const primitive_id& weights,
44 const padding& output_padding = padding())
45 : primitive_base(id, {input_grad, input}, output_padding), weights(weights) {
48 /// @brief Primitive id containing weights data.
52 std::vector<std::reference_wrapper<const primitive_id>> get_dependencies() const override {