lib/torch/utils/data/data_loader.rb in torch-rb-0.3.5 vs lib/torch/utils/data/data_loader.rb in torch-rb-0.3.6
- old
+ new
@@ -43,9 +43,11 @@
end
def size
(@dataset.size / @batch_size.to_f).ceil
end
+ alias_method :length, :size
+ alias_method :count, :size
private
def default_convert(batch)
elem = batch[0]