Sha256: ecd579194f9b21b8dfff974f3769a0ecf8917f6e9157e0d54d642a723197d5b3

Contents?: true

Size: 485 Bytes

Versions: 33

Compression:

Stored size: 485 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%s", @negative_slope, inplace_str)
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
torch-rb-0.15.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.14.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.14.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.13.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.13.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.13.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.12.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.12.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.12.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.11.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.11.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.11.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.10.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.10.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.10.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.9.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.9.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.9.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.8.3 lib/torch/nn/leaky_relu.rb
torch-rb-0.8.2 lib/torch/nn/leaky_relu.rb