pt_leaky_relu_layer.h 557 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
/*
 * pocket-tensor (c) 2018 Gustavo Valiente gustavo.valiente.m@gmail.com
 * Kerasify (c) 2016 Robert W. Rose
 *
 * MIT License, see LICENSE file.
 */

#ifndef PT_LEAKY_RELU_LAYER_H
#define PT_LEAKY_RELU_LAYER_H

#include "pt_libsimdpp.h"
#include "pt_layer.h"

namespace pt
{

class LeakyReluLayer : public Layer
{

public:
    static std::unique_ptr<LeakyReluLayer> create(std::istream& stream);

    bool apply(LayerData& layerData) const final;

protected:
    FloatType _alpha;

    explicit LeakyReluLayer(FloatType alpha) noexcept;
};

}

#endif