Sha256: de12a0ee5bdb76b691efb56298aaf1aff8f6fa9991efded750fa5ac3425df873

Contents?: true

Size: 287 Bytes

Versions: 5

Compression:

Stored size: 287 Bytes

Contents

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
torch-rb-0.8.2 lib/torch/nn/parameter.rb
torch-rb-0.8.1 lib/torch/nn/parameter.rb
torch-rb-0.8.0 lib/torch/nn/parameter.rb
torch-rb-0.7.0 lib/torch/nn/parameter.rb
torch-rb-0.6.0 lib/torch/nn/parameter.rb