Sha256: 19c441037d4f8d44e5cc24ced18d8e69fe473d25d9ad0a23c426f6ba02205e92

Contents?: true

Size: 493 Bytes

Versions: 19

Compression:

Stored size: 493 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

19 entries across 19 versions & 1 rubygems

Version Path
torch-rb-0.3.5 lib/torch/nn/leaky_relu.rb
torch-rb-0.3.4 lib/torch/nn/leaky_relu.rb
torch-rb-0.3.3 lib/torch/nn/leaky_relu.rb
torch-rb-0.3.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.3.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.3.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.7 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.6 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.5 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.4 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.3 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.2 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.1 lib/torch/nn/leaky_relu.rb
torch-rb-0.2.0 lib/torch/nn/leaky_relu.rb
torch-rb-0.1.8 lib/torch/nn/leaky_relu.rb
torch-rb-0.1.7 lib/torch/nn/leaky_relu.rb
torch-rb-0.1.6 lib/torch/nn/leaky_relu.rb
torch-rb-0.1.5 lib/torch/nn/leaky_relu.rb
torch-rb-0.1.4 lib/torch/nn/leaky_relu.rb