Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# .idea/

# PyPI configuration file
.pypirc
Binary file added data/pycallgraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions data/pytensor_from_scratch.py.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
```mermaid
---
title: scripts/pytensor_from_scratch.py
---
classDiagram
class Type

class Op {
- __str__(self) str
}

class Node

class Variable {
- __init__(self, name, *, type) None
- __repr__(self) str
}

class Apply {
- __init__(self, op, inputs, outputs) None
- __repr__(self) str
}

class TensorType {
- __init__(self, shape, dtype) None
- __eq__(self, other)
- __repr__(self) str
}

class Add {
+ make_node(self, a, b)
}

class Sum {
+ make_node(self, a)
}

class Constant {
- __init__(self, data, *, type) None
- __repr__(self) str
}

class Sum {
- __init__(self, axis) None
+ make_node(self, a)
+ perform(self, inputs)
- __str__(self) str
}

class Mul {
+ make_node(self, a, b)
+ perform(self, inputs)
}

Variable --|> Node

Apply --|> Node

TensorType --|> Type

Add --|> Op

Sum --|> Op

Constant --|> Variable

Mul --|> Op
```
Loading