Sha256: f3b270e0beae5da43293562558075251d393dc3a3550eb53dd6d5c16e6dfad5c
Contents?: true
Size: 337 Bytes
Versions: 4
Compression:
Stored size: 337 Bytes
Contents
module Torch module NN class GELU < Module def initialize(approximate: 'none') super() @approximate = approximate end def forward(input) F.gelu(input, approximate: @approximate) end def extra_inspect "approximate: #{@approximate.inspect}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
torch-rb-0.18.0 | lib/torch/nn/gelu.rb |
torch-rb-0.17.1 | lib/torch/nn/gelu.rb |
torch-rb-0.17.0 | lib/torch/nn/gelu.rb |
torch-rb-0.16.0 | lib/torch/nn/gelu.rb |