Comments (4)
@momire the MNIST dataset is quite a big (and a little more complex) dataset. Calling the evolve()
function won't necessarily converge, and it's very time-expensive due to the networks being very big (~800 nodes). For me, one generation with 60 genomes takes about 20 seconds. (PS: i'm working on speeding up evolution drastically using webworkers).
However, it is definitely possible to evolve a network to work on the MNIST dataset, it just requires the use of various options. I'll be posting an example soon, but in the mean time, use the option { log: 1}
and you will see the network improving.
@alancnet I think I might create an extra option that disables warnings in functions that weren't called by the user. So warnings stay enabled when the user calles mutate()
but not when it happens from the evolve()
function.
from neataptic.
I tried your advice and it worked!
Thanks for your help.
(Unfortunately, I don't know how to use Web Walker for my skill)
from neataptic.
I agree warnings should be disabled by default, but there is a simple way to disable them:
require('neataptic').Config.warnings = false
from neataptic.
So a small example of training options which seems to work quite well for me (but still takes super long):
var mnist = require('mnist');
var neataptic = require('neataptic');
var set = mnist.set(700,20);
var trainingSet = set.training;
var testset = set.test;
var network= new neataptic.Network(784,10);
for(var i = 0; i < network.connections.length; i++){
network.connections[i].weight = Math.random() * .02 - .01;
}
var results = network.evolve(trainingSet, {
iterations: 150, // just so it stopped after a while
elitism: 5, // 10%
mutationRate: 0.7, // fairly high, yes
equal: true,
growth: 0, // this can create very large networks, you can also remove this
log: 1 // see how well it's doing
});
As you might have noticed, I have a custom weight initialisation algorithm. Neataptic doesn't take into account that 784 connections cause any (sigmoid) connected neuron to activate 1 with default weight init. I already have a clean weight initialisation process in my head which i'm coding now.
If you need more help with evolving the MNIST set let me know.
PS: I think the MNIST dataset works better with a backprop + evolve technique, which I might incorperate in the future.
from neataptic.
Related Issues (20)
- question #2 about agar.io AI?
- Neat's input and output parameters are useless if a network is provided HOT 1
- NEAT breaks with provenance with if no template network is provided
- No multithread on Neat.evolve()?
- neataptic LSTM bool sequence tunning
- XOR problem without hidden layer
- Not Found: @types/neataptic HOT 1
- Instinct or NEAT algorithm? HOT 1
- How to define output for evolve without target in game. HOT 4
- Multiple Crossover Methods HOT 2
- Cuda? HOT 5
- Handling dynamic data
- Softclip activation function
- Neataptic4J HOT 1
- Issue with multiple inputs and multiple outputs always returning NAN
- mutate() must skip elitist genomes
- Calculating ERROR THRESHOLD from propagation
- Copy a network? HOT 2
- neataptic from NPM version >=1.4.0 not working
- Copied network using fromJSON is returning outputs different from the original network
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neataptic.