Class: Torch::NN::ReLU
Instance Method Summary collapse
- #forward(input) ⇒ Object
-
#initialize ⇒ ReLU
constructor
(inplace: false).
Methods inherited from Module
#call, #inspect, #method_missing, #parameters, #respond_to?, #zero_grad
Constructor Details
#initialize ⇒ ReLU
(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 |