Path: blob/master/modules/dnn/src/vkcom/include/op_relu.hpp
16349 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html.3//4// Copyright (C) 2018, Intel Corporation, all rights reserved.5// Third party copyrights are property of their respective owners.67#ifndef OPENCV_DNN_VKCOM_OP_RELU_HPP8#define OPENCV_DNN_VKCOM_OP_RELU_HPP910#include "vkcom.hpp"11#include "op_base.hpp"1213namespace cv { namespace dnn { namespace vkcom {1415#ifdef HAVE_VULKAN1617class OpReLU: public OpBase18{19public:20OpReLU(const float slope = 1.f);21bool forward(Tensor& in, Tensor& out);22void reshapeOutTensor(Tensor& in, Tensor& out);23virtual bool forward(std::vector<Tensor>& ins,24std::vector<Tensor>& blobs,25std::vector<Tensor>& outs) CV_OVERRIDE;26private:27bool computeGroupCount();28int total_;29float slope_;30};3132#endif // HAVE_VULKAN3334}}} // namespace cv::dnn::vkcom3536#endif // OPENCV_DNN_VKCOM_OP_RELU_HPP373839