Sha256: 4518499d473883f94e64831a0a2e5c61763d30fbdbf9fe9c79bf077fe1dcf680

Contents?: true

Size: 233 Bytes

Versions: 58

Compression:

Stored size: 233 Bytes

Contents

module Torch
  module NN
    class Softmax2d < Module
      def forward(input)
        raise ArgumentError, "Softmax2d requires a 4D tensor as input" unless input.dim == 4
        F.softmax(input, dim: 1)
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
torch-rb-0.19.1 lib/torch/nn/softmax2d.rb
torch-rb-0.19.0 lib/torch/nn/softmax2d.rb
torch-rb-0.18.0 lib/torch/nn/softmax2d.rb
torch-rb-0.17.1 lib/torch/nn/softmax2d.rb
torch-rb-0.17.0 lib/torch/nn/softmax2d.rb
torch-rb-0.16.0 lib/torch/nn/softmax2d.rb
torch-rb-0.15.0 lib/torch/nn/softmax2d.rb
torch-rb-0.14.1 lib/torch/nn/softmax2d.rb
torch-rb-0.14.0 lib/torch/nn/softmax2d.rb
torch-rb-0.13.2 lib/torch/nn/softmax2d.rb
torch-rb-0.13.1 lib/torch/nn/softmax2d.rb
torch-rb-0.13.0 lib/torch/nn/softmax2d.rb
torch-rb-0.12.2 lib/torch/nn/softmax2d.rb
torch-rb-0.12.1 lib/torch/nn/softmax2d.rb
torch-rb-0.12.0 lib/torch/nn/softmax2d.rb
torch-rb-0.11.2 lib/torch/nn/softmax2d.rb
torch-rb-0.11.1 lib/torch/nn/softmax2d.rb
torch-rb-0.11.0 lib/torch/nn/softmax2d.rb
torch-rb-0.10.2 lib/torch/nn/softmax2d.rb
torch-rb-0.10.1 lib/torch/nn/softmax2d.rb