Skip to content

Instantly share code, notes, and snippets.

from __future__ import annotations
from contextlib import contextmanager
from typing import NamedTuple, Callable, Optional, Any
import numpy as np
Array = Any
class Node(NamedTuple):
vjp: Optional[Callable]
parents: List[Node]

Keybase proof

I hereby claim:

  • I am xu3kev on github.
  • I am thekev (https://keybase.io/thekev) on keybase.
  • I have a public key ASDNxr189e80hOU4nUgnfAG0_YjC5NJp_a0mCKOX0UlYZwo

To claim this, I am signing this object:

#
# Copyright (c) 1999 by the University of Southern California
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of