originrose / cortex

Machine learning in Clojure
Eclipse Public License 1.0
1.27k stars 111 forks source link

[Enhancement -design question] Visualizing parameter updates as training progresses #165

Closed shark8me closed 7 years ago

shark8me commented 7 years ago

Hi all,

Other neural network implementations have tools that aid visualization and debugging of a network while being trained. Specifically, I've found that the Tensorboard UI (from Tensorflow ) is quite capable.

The toolkit should be capable of turning on (or off) instrumentation for different parameters, such as

To enable the same kind of functionality in Cortex, there are a few design choices:

To me, the second approach is preferred for two reasons:

I would like to hear your thoughts on this topic

Thanks!

harold commented 7 years ago

Hi, thanks for these super-interesting thoughts.

Visualizations are key, and a hot topic here. Integrating with tensorboard is a neat idea and we'll definitely look into that.

We have a growing number of internal tools for doing the kinds of things you describe here that were using daily for customer projects. Coalescing them into something cogent and useful we can share as open-source is a stated goal of ours.

I appreciate you starting this conversation off, I'll be interested to see if others chime in; I bet we can end up with something pretty awesome.

mikera commented 7 years ago

I personally like the idea of decoupling things with clearly defined interfaces so that alternative visualisation approaches can be plugged in, especially if they have complex dependencies or environment setup requirements.

One general way to think about things would be to see training as a reduction process, such that:

shark8me commented 7 years ago

@harold Would the code in the experiment folder be a good starting point to instrument a training cycle and stream out important metrics?

I didn't see (or find) a listener function (like test-fn) in the cortex/src itself. Is it likely to get added there?

Thanks!

harold commented 7 years ago

Would the code in the experiment folder be a good starting point to instrument a training cycle and stream out important metrics?

I think so. The basic idea of experiment is layer advanced functionality over, and capture best practices uses of, the core cortex api. train.clj in experiment does this for neural nets in general. The file you linked is specific to neural nets for classification (one specific type of problem they can be used to solve).

I didn't see (or find) a listener function (like test-fn) in the cortex/src itself. Is it likely to get added there?

My guess would be no. The core functionality of training and running will be kept minimal in order to support various scenarios and remain minimal/composable/flexible.

cnuernber commented 7 years ago

@shark8me: Do you feel that your two recent tensorboard pull requests address this issue?

shark8me commented 7 years ago

Yes, it fixes the issue, this can be marked as resolved.

On 16-Jun-2017 5:43 PM, "Chris Nuernberger" notifications@github.com wrote:

@shark8me https://github.com/shark8me: Do you feel that your two recent tensorboard pull requests address this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/thinktopic/cortex/issues/165#issuecomment-309044862, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFb9KbNTZTSrPSALthrgSopJZprtJ0_ks5sEpSUgaJpZM4Na0LC .