Sha256: 2690c9b09615da9b6ec6ac8cd1f84367a4626f84cc685111e9e4cd282b0b80e6

Contents?: true

Size: 294 Bytes

Versions: 27

Compression:

Stored size: 294 Bytes

Contents

module Torch
  module NN
    class Parameter < Tensor
      def self.new(data = nil, requires_grad: true)
        data = Tensor.new unless data
        Tensor._make_subclass(data, requires_grad)
      end

      def inspect
        "Parameter containing:\n#{super}"
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
torch-rb-0.2.2 lib/torch/nn/parameter.rb
torch-rb-0.2.1 lib/torch/nn/parameter.rb
torch-rb-0.2.0 lib/torch/nn/parameter.rb
torch-rb-0.1.8 lib/torch/nn/parameter.rb
torch-rb-0.1.7 lib/torch/nn/parameter.rb
torch-rb-0.1.6 lib/torch/nn/parameter.rb
torch-rb-0.1.5 lib/torch/nn/parameter.rb