aboutsummaryrefslogtreecommitdiff
path: root/src/value.py
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-05-29 18:11:05 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-05-29 18:11:05 +0530
commit22f6c7e5b3fd45480f2ef7827474fdb9d6c6f82c (patch)
tree7d97cc24147ff1d8ffa7e1978a13418514df5c8b /src/value.py
parenta4c99c97b66c6aed0737430aa9bdeb8ec64e3d9f (diff)
Value -> Scalar
Diffstat (limited to 'src/value.py')
-rw-r--r--src/value.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/value.py b/src/value.py
deleted file mode 100644
index af0ab35..0000000
--- a/src/value.py
+++ /dev/null
@@ -1,20 +0,0 @@
-class Value:
- def __init__(self, data, _children=(), _op='', label='') -> None:
- self.label = label
-
- self.data = float(data)
- self.grad = 0.0
-
- self._prev = set(_children)
- self._op = _op
-
- def __repr__(self) -> str:
- return f'Value({self.data})'
-
- def __add__(self, y):
- result = self.data + y.data
- return Value(result, (self, y), _op='+')
-
- def __mul__(self, y):
- result = self.data * y.data
- return Value(result, (self, y), _op='*')