MLDataPattern.jl icon indicating copy to clipboard operation
MLDataPattern.jl copied to clipboard

fix _compute_batch_settings to not overwrite count with max_batchcount

Open colinxs opened this issue 6 years ago • 0 comments
trafficstars

According to the docs:

  using MLDataUtils
  X, Y = MLDataUtils.load_iris()
  # iterate over the first 2 batches of 15 observation each
  for (x,y) in batchview((X,Y), size=15, count=2)
      @assert typeof(x) <: SubArray{Float64,2}
      @assert typeof(y) <: SubArray{String,1}
      @assert size(x) == (4, 15)
      @assert size(y) == (15,)
  end

Indicating that the call above to batchview should return an iterator of length 2. Instead, it loads an iterator of length 10. This is because the count argument is overwritten in _compute_batch_settings. This PR removes that line.

colinxs avatar Jun 28 '19 01:06 colinxs