Skip to content

Instantly share code, notes, and snippets.

@tswedish
Last active May 26, 2020 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tswedish/fabfaff7c30cb1a7b9cf4eb265f64d21 to your computer and use it in GitHub Desktop.
Save tswedish/fabfaff7c30cb1a7b9cf4eb265f64d21 to your computer and use it in GitHub Desktop.
class Variable:
def __init__(self, operation, input_variables=[]):
# note the setter for @property value below
self.value = operation
self.input_variables = input_variables
self.gradient = 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment