Sha256: 9d389940eb8d3895207d6031db2aeb408564765c3171c630b064359641669b38
Contents?: true
Size: 484 Bytes
Versions: 4
Compression:
Stored size: 484 Bytes
Contents
module Torch module NN class LeakyReLU < Module def initialize(negative_slope: 1e-2, inplace: false) super() @negative_slope = negative_slope @inplace = inplace end def forward(input) F.leaky_relu(input, @negative_slope, inplace: @inplace) end def extra_inspect inplace_str = @inplace ? ", inplace: true" : "" format("negative_slope: %s", @negative_slope) + inplace_str end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
torch-rb-0.18.0 | lib/torch/nn/leaky_relu.rb |
torch-rb-0.17.1 | lib/torch/nn/leaky_relu.rb |
torch-rb-0.17.0 | lib/torch/nn/leaky_relu.rb |
torch-rb-0.16.0 | lib/torch/nn/leaky_relu.rb |