Skip to content

Commit fdf536c

Browse files
committed
Merge pull request #46 from vchuravy/vc/ops
imports operators into the namespace to prevent issues
2 parents f094a11 + 2ff90c3 commit fdf536c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/MXNet.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export mx
88
module mx
99
using Formatting
1010

11+
# Functions from base that we can safely extend and that are defined by libmxnet.
12+
import Base: round, ceil, floor, cos, sin, abs, sign, exp, sqrt, exp, log, norm
13+
1114
include("base.jl")
1215
include("context.jl")
1316

src/model.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141
"""
4242
function _split_inputs(batch_size :: Int, n_split :: Int)
4343
@assert(batch_size >= n_split)
44-
per_split = Base.floor(Int, batch_size / n_split)
44+
per_split = floor(Int, batch_size / n_split)
4545
counts = Base.zeros(Int, n_split)+per_split
4646
extra = batch_size - sum(counts)
4747
counts[1:extra] += 1

0 commit comments

Comments
 (0)