Sha256: 84ccd4e84eef522ba3c26d1c095f5cf27a8161dc3304944974a341579675d605

Contents?: true

Size: 246 Bytes

Versions: 2

Compression:

Stored size: 246 Bytes

Contents

module Torch
  module Utils
    module Data
      class TensorDataset
        def initialize(*tensors)
          @tensors = tensors
        end

        def [](index)
          tensors.map { |t| t[index] }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
torch-rb-0.1.1 lib/torch/utils/data/tensor_dataset.rb
torch-rb-0.1.0 lib/torch/utils/data/tensor_dataset.rb