Skip to content

Commit

Permalink
minor fix in docstrings of TorchTensorDotLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
loreloc committed Dec 12, 2024
1 parent ff28b73 commit 2541abd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cirkit/backend/torch/layers/optimized.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,11 @@ class TorchTensorDotLayer(TorchInnerLayer):
and $K_i$ is the number of input uits. The tensor dot layer firstly reshapes as the tensor
$\mathcal{Z}$ having shape $(B, K_j, K_q)$, where $K_i = K_jK_q$. Then, it computes the
tensor $\mathcal{S}$ of shape $(B, K_q, K_k)$ as follows:
$$
\mathcal{S}_{bqk} = \sum_{j=1}^{K_j} w_{kj} z_{bjq}
$$
in element-wise notation, where $\mathbf{W}$ is a tensor of shape $(K_k, K_j)$,
where we have that $K_o = K_qK_k$ is the number of output units.
Finally, it returns the output tensor of shape $(B, K_o)$ obtained by flattening the
Expand Down

0 comments on commit 2541abd

Please sign in to comment.