Permalink
Commits on Dec 09, 2016
@charmasaur charmasaur Merge pull request #18 from charmasaur/NeuralNetA
Get NN working a bit better on the tests
b6da43b
Commits on Dec 15, 2016
@charmasaur charmasaur Fix 1D neural net bug
Turns out np.float64(np.array([0])) returns 0, rather than np.array([0]).
d199ed5
@charmasaur charmasaur Merge pull request #19 from charmasaur/NeuralNetA
Fix 1D neural net bug
7fcc030
@charmasaur charmasaur Log NN fit cost e91ae24
@charmasaur charmasaur Merge branch 'NeuralNetA' of https://github.com/michaelhush/M-LOOP in…
…to NeuralNetA
652ba60
@charmasaur charmasaur Merge pull request #20 from charmasaur/NeuralNetA
Log NN fit cost
915cd9d
Commits on Dec 16, 2016
@charmasaur charmasaur Add some fuzziness to the NN parameter prediction
It has no incentive to explore at all, so can easily get stuck close to
a local minimum if it hasn't quite modelled the position correctly. By
adding some very basic fuzziness (just randomly tweaking the predicted
best parametere) we can at least make it more likely to find true local
minima.
a4dd308
@charmasaur charmasaur Refactor of NNI to support hyperparameter fitting
Pull the params associated with a single neural network (of particular
topology and hyperparameters out into a separate class). This way NNI
can cleanly construct new networks if it decides that topology or
hyperparameters need changing.
d42f0c7
@charmasaur charmasaur Add support for fitting the regularisation coeff
Every 20 fits, it generates a bunch of new networks with various
regularisation coefficients. It trains each on (most of) the current
data, and then tests on a cross validation set. If the best of these
performs significantly better than the current network on the cv set
then it replaces the current net with the new one. Disable this for now
because it seems like it still needs a bit of tweaking.

Also add a comment about possibly artifically capping costs.
ac49a63
@charmasaur charmasaur Merge pull request #21 from charmasaur/NeuralNetA
NN improvements
0538fa4
Commits on Dec 18, 2016
@charmasaur charmasaur Fix always-off bug in regularisation-fitting 707bada
@charmasaur charmasaur Merge pull request #22 from charmasaur/NeuralNetA
Fix always-off bug in regularisation-fitting
c3db081
Commits on May 01, 2017
@charmasaur charmasaur Use mean instead of sum for regularization
If we use sum then we need to change the coefficient pretty drastically
when the number of layers changes. Mean should mean that a particular
coefficient has the same meaning for all topologies.
0e0b518
@charmasaur charmasaur Don't fuzz parameters for now 27210d3
@charmasaur charmasaur Print unregularized training loss 37621a2
@charmasaur charmasaur Fix typo in visualizations b6e06cd
@charmasaur charmasaur Tweak params 9dac2d7
@charmasaur charmasaur Switch to abs activation function, and 1 layer
This is the best match for the landscape I've seen yet. Next we should
try extra sigmoid/relu layers on top of the abs. Or maybe multiple abs
layers, but I doubt that's necessary.
347202c
@charmasaur charmasaur Support different activation functions 51e6012
Commits on May 02, 2017
@charmasaur charmasaur Tweaks 393d32e
@charmasaur charmasaur Support for saving/loading NN training state 6cbfca1
Commits on May 03, 2017
@charmasaur charmasaur Fix network saving/loading
Problem before was that I was using the same TF graph for everything, so
when making extra network it was adding the nodes to the graph rather
than using a new graph, and this confused the restoration (since the
checkpoint files only expected one net in the graph, but we had two).
Fixed this by associating a new tf.Graph with each net.

Also closed the TF session when we stop using a net. This is probably
good for efficiency.
a0f546b
@charmasaur charmasaur Add comment about privateness to SingleNeuralNet 55ce021
@charmasaur charmasaur Use default Adam learning rate
This seems to improve performance with deep nets a LOT (I think before
we were overshooting the minima).
fabc00e
@charmasaur charmasaur New training procedure
To make sure we're not underfitting, we keep training until the
improvement is small.
6e5cf67
@charmasaur charmasaur Don't try to train past 0 loss ec20782
@charmasaur charmasaur Remove artificial ylim in cost vs run plot 21ae741
@charmasaur charmasaur Move training threshold down to 10% ca5aa51
Commits on May 04, 2017
@charmasaur charmasaur Try some uncertainty
Rather than returning the actual expected value we return an LCB-style
value. We get this from feeding through the network with dropout a bunch
of times, and taking the 20th percentile.

I think if we're going to do this then it makes sense to train with
dropout.
5c927ec
@charmasaur charmasaur Save cost vs run to a file f058637
Commits on May 09, 2017
@charmasaur charmasaur Code cleanup in nnlearner 7bc3245
@charmasaur charmasaur Disable the LCB stuff for now 3460669
@charmasaur charmasaur Keep track of training losses 32caaed
@charmasaur charmasaur Tweak some NN params 2893679
@charmasaur charmasaur Scale costs in the NN
We fit the scaler to the costs after the initial training runs, and
never change it.
a452cf1
@charmasaur charmasaur Remove unnecessary NN fit in visualizations
Now that we're doing cost scaling properly this is no longer necessary.
fcbaba4
@charmasaur charmasaur Plot training losses ce15c4a
@charmasaur charmasaur Add test to repo 67bb797
Commits on May 10, 2017
@charmasaur charmasaur Tidy up NNL cost scaler initialisation 4d94db7
@charmasaur charmasaur Tidy up NeuralNetImpl fddf85f
@charmasaur charmasaur Add support for scaling costs and params to NeuralNetImpl
We can already scale costs in the learner, but moving it to NNI makes it
more clear that it's an implementation detail (which it is).
1bb04db
@charmasaur charmasaur Make training threshold configurable e801dce
@charmasaur charmasaur Add support for surface density plots 83e8e66
@charmasaur charmasaur Tweak params ea1e6ee
@charmasaur charmasaur Hide some less useful plots 8225a12
Commits on May 11, 2017
@charmasaur charmasaur Tweak params and update some docs 4216520
@charmasaur charmasaur Initialise scalers in a more sensible place 884b76b
@charmasaur charmasaur Experiment with adding 10 to cost after scaling
Seems to work quite well, actually. Need to understand why.
c4975fd
Commits on May 15, 2017
@charmasaur charmasaur Rename scalers to make them look more private c397b6e
@charmasaur charmasaur Pull the artificial mean offset into a variable 666cc73
@charmasaur charmasaur Set mean offset to 0
We shouldn't need this. The net should easily be able to fit that.
3e67b2b
Commits on May 16, 2017
@charmasaur charmasaur Allow epochs to be specified per-train b3b2ab9
@charmasaur charmasaur Support training multiple networks simultaneously
Sampling a random one when getting values.
1f0fcb7
@charmasaur charmasaur Add basic training timing a493033
@charmasaur charmasaur Train less for incremental points 3bfe89b
@charmasaur charmasaur Initial attempt at shifting batching into TF graph
Doesn't work yet.
5b23310
@charmasaur charmasaur Speed up loss evaluation
Each call to Session.run() has some overhead, and when we do it every
single epoch those overheads add up. One of those calls-per-epoch was
unnecessary, so remove that. This seems to result in a speed up of about
10%.
d171c57
@charmasaur charmasaur Add more timing 38926a9
Commits on May 19, 2017
@charmasaur charmasaur Switch to global_variables_initializer 40feacd
@charmasaur charmasaur Tidy up net initialisation e7d78f0
@charmasaur charmasaur Alternative training methods
One shuffles the actual arrays rather than shuffling indices and pulling
out elements.

One moves the whole epoch into the TF graph.

Neither of these seem to give a significant speed improvement.
86ca553
@charmasaur charmasaur Revert "Alternative training methods"
This reverts commit 86ca553.

Reverting because they're slower, but I still want them in history.
aff482e
@charmasaur charmasaur Add comment in net init b1dffc9
@charmasaur charmasaur Make batch creation slightly more efficient 1f09c65
@charmasaur charmasaur Remove batch timing da80dfd
@charmasaur charmasaur Only log every 10th epoch's loss
Getting the loss is actually pretty slow.
3250c25
@charmasaur charmasaur Add net construction timing 9b8699f
@charmasaur charmasaur Revert "Initial attempt at shifting batching into TF graph"
This reverts commit 5b23310.
6c622ce
@charmasaur charmasaur Merge branch 'graph' into nntesting
Well that didn't work.
ebc23c0
@charmasaur charmasaur Remove epoch timing (too spammy) 0757949
@charmasaur charmasaur Don't save the learner archive every step dcb7f0f
@charmasaur charmasaur Tidy up some NN logging c9670d5
@charmasaur charmasaur Attempt to fix race condition in NN learner
The problem is that the "new params" event can be seen before the params
are actually available on the queue, and the learner can't handle this.
Work around it by making the learner better at handling it -- now it'll
block waiting for those params for 1s.
81089ba
@charmasaur charmasaur Add support for doing an optimisation run over the net
Problem is that with stochastic nets, we can get really weird values
with consecutive calls to predict_cost(_gradient). Now you can put the
net in a state where you should get more consistent results.
37f2d2a
@charmasaur charmasaur Tweak params to do better with many params 81e697e
Commits on May 21, 2017
@charmasaur charmasaur Use different vars for initial and subsequent epoch counts cefbe78
Commits on May 22, 2017
@charmasaur charmasaur Fix x-axis on NN cross sections plot 981b824
@charmasaur charmasaur Set initial weights smartly
We use the strategy in https://arxiv.org/pdf/1502.01852.pdf.
42e6558
@charmasaur charmasaur Rename stddev to bias_stddev 0364fdc
@charmasaur charmasaur Use correct per-layer activation functions
This was a typo when doing the refactor before (to split creating
variables from wiring them up). It would cause us to use the function
specified for the last layer in every layer.
96c17c8
Commits on May 23, 2017
@charmasaur charmasaur Use normal logging for NN learner
This will need to be reverted before merging.
7788e8b
@charmasaur charmasaur Add logging when searching for params 2b2bc8a
@charmasaur charmasaur Updates to NN visualizations
Specifically, start showing param vs run again, and also plot the
predicted cross sections about the predicted best params (rather than
the best params found).
a11ccee
Commits on May 24, 2017
@charmasaur charmasaur Bump up bias initialisation standard deviation
This will cause more randomness in the initial and trained nets (I
think).
0410e8c
@charmasaur charmasaur Remove some old TODOs 5f4b23a
@charmasaur charmasaur Use timestamped file for net archive 6630983
@charmasaur charmasaur Tidying/renaming in neural net b84a74e
@charmasaur charmasaur Rename nnlearner to neuralnet
NeuralNet really is just supposed to be a neural network / function
approximator.
3b06e69
@charmasaur charmasaur Tidy up NeuralNetLearner
Remove unused attributes, fix some documentation.
70e91f9
@charmasaur charmasaur Update description of neural net learner 9f80041
@charmasaur charmasaur Set minimum_uncertainty in nnl bf83469
@charmasaur charmasaur Untrack local_tests 728c204
@charmasaur charmasaur Tidy visualisations 22e981f
@charmasaur charmasaur Undo logging hackery 5dc3ed7
@charmasaur charmasaur Merge pull request #1 from charmasaur/nntesting
Merge latest neural net work
b75bb9f
@charmasaur charmasaur Destroy the net when we're done af4a2f9
@charmasaur charmasaur Add tensorflow to requirements and setup.py 9763289
@charmasaur charmasaur Use mlu.empty_exception instead of queue.Empty d5425fd
@charmasaur charmasaur Merge branch 'NeuralNetA' into nntesting fa2406c
@charmasaur charmasaur Run Travis CI on trusty 42b07c6
@charmasaur charmasaur Run Travis CI on trusty 5a87daa
@charmasaur charmasaur Merge pull request #25 from charmasaur/trav
Run Travis CI on trusty
6e3e6f1
@charmasaur charmasaur Merge branch 'NeuralNetA' of https://github.com/michaelhush/M-LOOP in…
…to NeuralNetA
9cdf6e9
@charmasaur charmasaur Merge pull request #24 from charmasaur/NeuralNetA
Import neural net changes from charmasaur
b5654fc
Commits on May 29, 2017
@charmasaur charmasaur Fix NN exception on python 2
On python 2 math.ceil returns a float, and this was making range unhappy.
5650631
@charmasaur charmasaur Merge pull request #26 from charmasaur/nnrangefix
Fix NN exception on python 2
88d6f69
@charmasaur charmasaur Log learner type with run number 9e32eb6
@charmasaur charmasaur Merge pull request #27 from charmasaur/logging
Log learner type with run number
6f74069
@charmasaur charmasaur Add "training" logging to all training runs 6c9e868
@charmasaur charmasaur Merge pull request #28 from charmasaur/l2
Add "training" logging to all training runs
7684f00
Commits on May 30, 2017
@charmasaur charmasaur Add tensorflow to requirements and setup.py e53d3fc
@charmasaur charmasaur Use mlu.empty_exception instead of queue.Empty 15538b6
@charmasaur charmasaur Run Travis CI on trusty 8cb1e45
@charmasaur @charmasaur charmasaur + charmasaur Fix NN exception on python 2
On python 2 math.ceil returns a float, and this was making range unhappy.
a12f3e5
@charmasaur charmasaur Log learner type with run number 94d1868
@charmasaur @charmasaur charmasaur + charmasaur Add "training" logging to all training runs 7f8e9f9
@charmasaur charmasaur Make NNLearner.fit_neural_net more private b5cafaf
@charmasaur charmasaur Support multiple nets at the learner level
This means we can do things like cycle through nets per generation,
interleave param generation and training of those nets, and so on.

We can probably remove the sampling from the net itself now.
4103cfd
@charmasaur charmasaur Bump generation num and nets count up to 3 cc45898
@charmasaur charmasaur Implement get_losses for multiple nets 4b41fd3
@charmasaur charmasaur Move start/stop opt out of debugging methods ad09089
@charmasaur charmasaur Merge branch 'nntesting' of https://github.com/charmasaur/M-LOOP into…
… nntesting
4f47806
@charmasaur charmasaur Fix get_losses 8f4e9f1
Commits on May 31, 2017
@charmasaur charmasaur Support loading visualisations from archive 8b4d67a
@charmasaur charmasaur Allow multiple nets to be saved
Previously this didn't really work, because if you constructed multiple
nets in quick succession they'd save over each other. Now the filenames
have a few random bytes in them, so this shouldn't be a problem any
more.
88f5613
@charmasaur charmasaur Support multiple nets in visualisations 7d2627b
Commits on Jun 01, 2017
@charmasaur charmasaur Support uploading NN cross sections to plotly b7cd840
@charmasaur charmasaur Add plotly to requirements ff3d45d
@charmasaur charmasaur Add script to show visualisations from an archive 49123b9
@charmasaur charmasaur Comment tidying 055fde5
@charmasaur charmasaur Logging tweaks f27d2b7
@charmasaur charmasaur Make sure every net gets trained with each new parameter set
Previously if the number of nets was greater than the generation num
then we wouldn't train the extra nets.
c53cded
@charmasaur charmasaur Merge branch 'nntesting' into NeuralNetA 4898263
@charmasaur charmasaur Merge pull request #29 from charmasaur/NeuralNetA
Train an ensemble of nets simultaneously
8f14569
@charmasaur charmasaur Switch cross sections to be about best found point
(rather than best predicted point)
3e7914c
@charmasaur charmasaur Add plot of max/min/mean cross sections 9356e31
@charmasaur charmasaur Show labels on min/max plots too 4667761
@charmasaur charmasaur Merge pull request #30 from charmasaur/nntesting
Improved visualization of cost landscape for an ensemble of nets
f4cc1b5