quad
quad
¤
QuadGraph(shape)
¤
Constructs a Quad Graph region graph.
See
- Unifying and understanding overparameterized circuit representations via low-rank tensor decompositions. 🔗 Mari, Antonio, Gennaro Vessio, and Antonio Vergari. In The 6th Workshop on Tractable Probabilistic Modeling. 2023.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shape
|
tuple[int, int, int]
|
The image shape \((C, H, W)\), where \(H\) is the height, \(W\) is the width, and \(C\) is the number of channels. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
RegionGraph |
RegionGraph
|
A Quad Graph region graph. |
Raises:
| Type | Description |
|---|---|
ValueError
|
The image shape is not valid. |
Source code in cirkit/templates/region_graph/algorithms/quad.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
QuadTree(shape, *, num_patch_splits=2)
¤
Constructs a Quad Tree region graph.
See
- Unifying and understanding overparameterized circuit representations via low-rank tensor decompositions. 🔗 Mari, Antonio, Gennaro Vessio, and Antonio Vergari. In The 6th Workshop on Tractable Probabilistic Modeling. 2023.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shape
|
tuple[int, int, int]
|
The image shape \((C, H, W)\), where \(H\) is the height, \(W\) is the width, and \(C\) is the number of channels. |
required |
num_patch_splits
|
int
|
The number of splits per patitioning, it can be either 2 or 4. |
2
|
Returns:
| Name | Type | Description |
|---|---|---|
RegionGraph |
RegionGraph
|
A Quad Tree region graph. |
Raises:
| Type | Description |
|---|---|
ValueError
|
The image shape is not valid. |
ValueError
|
The number of patches to split is not valid. |
Source code in cirkit/templates/region_graph/algorithms/quad.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |