gigasquid / clojure-mxnet

Clojure Package for MXNET
69 stars 3 forks source link

behavior of fit in high level module API when eval-data is nil #10

Closed jimdunn closed 6 years ago

jimdunn commented 6 years ago

Hi, The docstring for fit suggests that it is acceptable for the eval-data option to be nil https://github.com/gigasquid/clojure-mxnet/blob/d37dbec8e5a0ecc9b3f4eae8624da7b48baee679/src/org/apache/clojure_mxnet/module.clj#L554 but that doesn't seem to be the case here https://github.com/gigasquid/clojure-mxnet/blob/d37dbec8e5a0ecc9b3f4eae8624da7b48baee679/src/org/apache/clojure_mxnet/module.clj#L599 where the score function always runs. So I always have to pass eval-data to the fit or I get an error. Is this an oversight? Or perhaps I'm missing something.

gigasquid commented 6 years ago

Hi @jimdunn - thanks for opening an issue. You are correct, it is a bug. It should only try to do the evaluation if there is eval-data present.

Thanks for finding it. I'll fix it shortly unless you are interested in submitting a PR for it 👍

jimdunn commented 6 years ago

Sure, I can submit a PR.

gigasquid commented 6 years ago

Fixed by https://github.com/gigasquid/clojure-mxnet/pull/11