shlogg · Early preview
Shrijith Venkatramana @shrsv

Breaking Down Neural Networks With LiveAPI's Value Class

Building LiveAPI, a tool for generating API docs from code, with Value class implementing basic math ops like addition, subtraction, multiplication, division & exponentiation.

Hi there! I'm Shrijith Venkatrama, founder of Hexmos. Right now, I’m building LiveAPI, a tool that makes generating API docs from your code ridiculously easy.

  
  
  Breaking down tanh into its constituent operations

We have the definition of tanh as follows:

We can see that the above formula has:

exponentiation
subtraction
addition
division

  
  
  What the Value class cannot do now


a = Value(2.0)
a + 1

    
    

    
    




The above doesn't work, because a is of Value type whereas 1 is of int type.
We can fix this by automatically trying to convert 1 into a Value type in the __a...