Currently it’s quite simple and so not massively extensible for things like CNN. Although that is the area I’m looking at now 😄
As for additional layers, we could add them relatively easy. Basically it’s all geared around variables W1 and W2 that are the weights between the input and hidden layer, and hidden and output layers respectively.
Extending the init, forward, backward etc should be easy enough to extend.
Something else I can look at 😄
I don't know if anyone's interested, but I took a combination of the Sketch example, along with some other examples I've seen online, and come up with the following.
It's a simple Neural Network class, prepare data, train it and it can hopefully guess what you draw to test it with.
- Draw three positive image, all the same. I.e. Draw three smiley faces.
- Then draw three negative images, all the same. I.e. Draw three sad faces.
- Then press the Train button.
- OK so now it's ready. Draw either a copy of the positive or negative image, and see if it gets it right 😀
I don't claim this is the best code ever, or even efficient algorithm and could be tuned much better, but thought I'd share it anyway 😀
There are some excellent game examples / tutorial in Pythonista examples (i think it's about 7 parts), but I wonder if they are available online too, or just inside Pythonista?
Having recently purchased it i'm having great fun getting to grips with it all but don't always have my iPad with me when ideas pop into my head and having those examples available would help.
Just wondered :)
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
var imgData = ctx.getImageData(10, 10, 50, 50);
And I’d have a lovely array of pixel data I could use.
Is there anything similar in Pythonista for data in a Scene?