Class: Torch::NN::ReLU

Inherits:
Module
  • Object
show all
Defined in:
lib/torch/nn/relu.rb

Instance Method Summary collapse

Methods inherited from Module

#call, #inspect, #method_missing, #parameters, #respond_to?, #zero_grad

Constructor Details

#initializeReLU

(inplace: false)



4
5
6
# File 'lib/torch/nn/relu.rb', line 4

def initialize #(inplace: false)
  # @inplace = inplace
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Torch::NN::Module

Instance Method Details

#forward(input) ⇒ Object



8
9
10
# File 'lib/torch/nn/relu.rb', line 8

def forward(input)
  F.relu(input) #, inplace: @inplace)
end