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