Class: RubyZero::NN::Layers::ReLU

Inherits:
Layer show all
Defined in:
lib/rubyzero/nn/layers/relu.rb

Overview

ReLU Layer

Instance Method Summary collapse

Methods inherited from Model

#__get_str__, #call, #eval, #inspect, load, #parameters, #save, #train

Constructor Details

#initializeReLU

Returns a new instance of ReLU.



4
5
# File 'lib/rubyzero/nn/layers/relu.rb', line 4

def initialize()
end

Instance Method Details

#forward(x) ⇒ Object



6
7
8
# File 'lib/rubyzero/nn/layers/relu.rb', line 6

def forward(x)
    return RubyZero::Core::Functions::ReLU.new().call(x)
end