Open deem0n opened 5 years ago
Hey, this is the MXNet Label Bot. Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it. Here are my recommended labels: Bug
Thanks @deem0n for reporting the issue and also for providing a nice repro case 💯
@gigasquid Can you check which function call to the Scala portion. It might be a scala problem
Sorry it took me so long to get back to this.
First, thanks so much for the detailed steps and github/branch to reproduce 💯
Now for the weird news - I did the exact steps outlined to reproduce and didn't get 0 😕
Here is my output (tested on my mac MacBook Pro (Retina, 15-inch, Late 2013)
and also MacBook Pro (15-inch 2018)
Just started training...
[10:52:29] src/io/iter_mnist.cc:110: MNISTIter: load 60000 images, shuffle=1, shape=(10000,784)
[10:52:30] src/io/iter_mnist.cc:110: MNISTIter: load 10000 images, shuffle=1, shape=(5000,784)
WARN org.apache.mxnet.WarnIfNotDisposed: LEAK: [one-time warning] An instance of org.apache.mxnet.NDArray was not disposed. Set property mxnet.traceLeakedObjects to true to enable tracing
WARN org.apache.mxnet.WarnIfNotDisposed: LEAK: [one-time warning] An instance of org.apache.mxnet.io.MXDataIter was not disposed. Set property mxnet.traceLeakedObjects to true to enable tracing
Mini batches: 5000
.INTERMEDIATE 0.16412103 * 0.3 = 0.049236313
INTERMEDIATE 1.065679 * 0.3 = 0.3197037
INTERMEDIATE 0.1732387 * 0.3 = 0.05197161
INTERMEDIATE 1.069547 * 0.3 = 0.32086414
.INTERMEDIATE 0.25935003 * 0.3 = 0.07780501
INTERMEDIATE 0.75463897 * 0.3 = 0.2263917
INTERMEDIATE 0.2725639 * 0.3 = 0.081769176
INTERMEDIATE 0.84347457 * 0.3 = 0.25304237
.INTERMEDIATE 0.13788064 * 0.3 = 0.041364193
INTERMEDIATE 0.42585567 * 0.3 = 0.1277567
INTERMEDIATE 0.14192675 * 0.3 = 0.042578027
INTERMEDIATE 0.42733985 * 0.3 = 0.12820196
.INTERMEDIATE 0.11281382 * 0.3 = 0.033844147
INTERMEDIATE 0.7060675 * 0.3 = 0.21182026
INTERMEDIATE 0.10053872 * 0.3 = 0.030161617
INTERMEDIATE 0.72622657 * 0.3 = 0.21786799
.INTERMEDIATE 0.13522136 * 0.3 = 0.04056641
INTERMEDIATE 0.5249011 * 0.3 = 0.15747033
INTERMEDIATE 0.13516489 * 0.3 = 0.04054947
INTERMEDIATE 0.52688986 * 0.3 = 0.15806696
.INTERMEDIATE 0.14416938 * 0.3 = 0.043250814
INTERMEDIATE 0.31797385 * 0.3 = 0.09539216
INTERMEDIATE 0.14395727 * 0.3 = 0.043187182
INTERMEDIATE 0.31797716 * 0.3 = 0.09539315
.INTERMEDIATE 0.062895596 * 0.3 = 0.01886868
INTERMEDIATE 0.18372236 * 0.3 = 0.05511671
INTERMEDIATE 0.063012555 * 0.3 = 0.018903768
INTERMEDIATE 0.18413597 * 0.3 = 0.055240795
.INTERMEDIATE 0.052791305 * 0.3 = 0.015837392
INTERMEDIATE 0.54763573 * 0.3 = 0.16429073
INTERMEDIATE 0.0560796 * 0.3 = 0.01682388
INTERMEDIATE 0.5777395 * 0.3 = 0.17332184
.INTERMEDIATE 0.07229043 * 0.3 = 0.02168713
INTERMEDIATE 0.19547275 * 0.3 = 0.058641825
INTERMEDIATE 0.07235214 * 0.3 = 0.021705642
INTERMEDIATE 0.19866998 * 0.3 = 0.059600998
.INTERMEDIATE 0.07617488 * 0.3 = 0.022852464
INTERMEDIATE 0.07070907 * 0.3 = 0.021212723
INTERMEDIATE 0.07607305 * 0.3 = 0.022821916
INTERMEDIATE 0.053693853 * 0.3 = 0.016108157
Epoch 0: 97 / 1000
Very weird! Wondering what Mac model you have? Can you share your specs, OS ?
Also - wondering if it still happens if you upgrade to the latest 1.5.1 jar? https://search.maven.org/search?q=clojure-mxnet
Description
ndarray/*
results in zero ndarray when second arg is float in range (0,1). For example: 0.3 or 0.9Environment info
Package used (Python/R/Scala/Julia): Clojure
Clojure 1.10.1 java version "1.8.0_211" Java(TM) SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
MXNet: org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu "1.4.1"
Minimum reproducible example
Please clone
mul-bug
branch from github: https://github.com/deem0n/deep-book-clojure/tree/mul-bugDownload MNIST files and run
lein run
Check
update-mini-batch
function in core.clj This is line where weird thing happens!Steps to reproduce
git clone https://github.com/deem0n/deep-book-clojure.git
cd deep-book-clojure
git checkout mul-bug
utils/get_mnist_data.sh
lein run
Example output
Notes
Strangely enough when I run code:
it runs correctly in REPL. But even constant ndarray get zero result, if I put it into
update_mini_batch
Even this code will result in zero ndarray !
What have you tried to solve it?
ndarray/div
as workaround