Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

fix _compute_batch_settings to not overwrite count with max_batchcount #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix _compute_batch_settings to not overwrite count with max_batchcount #29

wants to merge 1 commit into from

Conversation

colinxs
Copy link

@colinxs colinxs commented Jun 28, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant