Skip to content

xor training example #1

Open
Open
@shiffman

Description

@shiffman

This example works!

https://shiffman.github.io/Tensorflow-JS-Examples/01_XOR/

screen shot 2018-05-03 at 6 04 05 pm

I am planning to recreate my XOR Coding Challenge in a video tutorial with the layers API. @nsthorat @dsmilkov @cvalenzuela @yining1023 feel free to take a look at the code in case you have any feedback!

This example at the moment is written in a slightly strange way as I'm experimenting with ideas for wrapping the layers API into new classes for ml5: NeuralNetwork (likely not the same I will use) and Batch. When I make a tutorial I will just walk through the steps without breaking things out into separate classes. And then eventually I'll make an even simpler ml5 tutorial?

The things I'm not super sure about:

  • use of tidy() vs. individual dispose()
  • how to run training effectively in a loop while also having an animation loop i.e. p5's draw().
  • learning rate considerations
  • epochs per training cycle considerations
  • using dataSync() vs data() (in conjunction with an animation loop).

This is obviously a totally trivial example -- The XOR problem is one that helps me think through and learn how this stuff works. . so hopefully it's useful?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions