top of page

TensorFlow Recognizing Simple Addition

  • Writer: Derek Ferguson
    Derek Ferguson
  • Oct 5, 2018
  • 1 min read

So, many of you know by now that I am speaking on the topic of using TensorFlow with Java at the Joker Java conference in St. Petersburg, Russia on October 19-20. I have been challenged to add a demo to my presentation that will show TensorFlow recognizing simple addition as the function connecting a series of 3-number tuples. For example:

1 4 5

2 7 9

13 13 26

4 8 12

My first, naive attempt at this was to see if linear regression could be used for a non-scalar X. So - created a rank 0, size 2 tensor for the addends. It seems that when you do that, the Y becomes a tensor of the same shape - so... no joy there.

Unless I'm missing something, this leads me to believe that I will have to create a tiny, tiny neural network for this task. 4 output nodes - addition, subtraction, multiplication and division, three input neurons - one for each input quantity... then generate a bunch of sample data that is distinct (in other words - avoiding things like 2 2 4 - which could be either addition or multiplication), pass it through the neural network and hope for the best.

I guess I know what my Sunday looks like. :-)

 
 
 

Comments


  • Facebook
  • Twitter
  • LinkedIn

©2018 by Machine Learning for Non-Mathematicians. Proudly created with Wix.com

bottom of page