class MXNet::Gluon::Data::RandomSampler
Overview
Samples elements from [0, size) randomly without replacement.
Defined in:
mxnet/gluon/data/sampler.crConstructors
-
.new(size : Int32)
Creates a new instance.
Instance Method Summary
-
#each(&)
Must yield this collection's elements to the block.
- #each
-
#size : Int32
Returns the number of elements in the collection.
Instance methods inherited from class MXNet::Gluon::Data::Sampler(Int32)
each(&block : T -> _)each each, size size
Constructor Detail
def self.new(size : Int32)
#
Instance Method Detail
def each(&)
#
Description copied from module Enumerable(Int32)
Must yield this collection's elements to the block.
def size : Int32
#
Description copied from module Enumerable(Int32)
Returns the number of elements in the collection.
[1, 2, 3, 4].size # => 4