Sha256: 14a49dbd789969c2a2d61d85a15ef9a412f8ce159c3c6568af1e745873ffd524

Contents?: true

Size: 223 Bytes

Versions: 3

Compression:

Stored size: 223 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
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
torch-rb-0.1.4 lib/torch/nn/parameter.rb
torch-rb-0.1.1 lib/torch/nn/parameter.rb
torch-rb-0.1.0 lib/torch/nn/parameter.rb