Skip to content

Commit

Permalink
Merge pull request apache#53 from BigEpsilon/patch-4
Browse files Browse the repository at this point in the history
Fix compilation errors for julia 0.4.2
  • Loading branch information
pluskid committed Dec 12, 2015
2 parents 9286bcc + 8e879d7 commit 32c8954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ immutable ArrayDataBatch <: AbstractDataBatch
idx :: UnitRange{Int}
end
function Base.next(provider :: ArrayDataProvider, state :: ArrayDataProviderState)
idx = state.curr_idx:min(state.curr_idx+provider.batch_size-1, provider.sample_count)
idx = state.curr_idx:Base.min(state.curr_idx+provider.batch_size-1, provider.sample_count)
return (ArrayDataBatch(idx), ArrayDataProviderState(idx.stop+1))
end

Expand Down
2 changes: 1 addition & 1 deletion src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function _split_inputs(batch_size :: Int, n_split :: Int)
@assert(batch_size >= n_split)
per_split = floor(Int, batch_size / n_split)
counts = Base.zeros(Int, n_split)+per_split
extra = batch_size - sum(counts)
extra = batch_size - Base.sum(counts)
counts[1:extra] += 1

cum = [0, cumsum(counts)...]
Expand Down

0 comments on commit 32c8954

Please sign in to comment.