Skip to content

Commit

Permalink
double ticks required for nbsphinx links with code block?
Browse files Browse the repository at this point in the history
  • Loading branch information
mfinzi committed Mar 18, 2021
1 parent 8465a82 commit 912a04c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/notebooks/3new_groups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"metadata": {},
"source": [
"Implementing a new group equivariance in our library is fairly straightforward. \n",
"You need to specify the discrete and continuous generators of the group in a given representation: $\\rho(h_i)$ and $d\\rho(A_k)$, and then call the init method. These two fields, `self.discrete_generators` and `self.lie_algebra` should be a sequence of square matrices. These can either be specified as dense arrays (such as through `np.ndarray`s of size `(M,n,n)` and `(D,n,n)`) or as [`LinearOperator`](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/linear_operators.py) objects that implement matmul lazily. In general it's possible to implement any matrix group, and we'll go through a few illustrative examples. After checking out these examples, you can browse through the implementations for many other groups [here](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/groups.py)."
"You need to specify the discrete and continuous generators of the group in a given representation: $\\rho(h_i)$ and $d\\rho(A_k)$, and then call the init method. These two fields, `self.discrete_generators` and `self.lie_algebra` should be a sequence of square matrices. These can either be specified as dense arrays (such as through `np.ndarray`s of size `(M,n,n)` and `(D,n,n)`) or as [``LinearOperator``](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/linear_operators.py) objects that implement matmul lazily. In general it's possible to implement any matrix group, and we'll go through a few illustrative examples. After checking out these examples, you can browse through the implementations for many other groups [here](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/groups.py)."
]
},
{
Expand Down Expand Up @@ -227,9 +227,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For larger representations our solver uses an iterative method that benefits from faster multiplies with the generators. Instead of specifying the generators using dense matrices, you can specify them as [`LinearOperator`](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/linear_operators.py) objects in a way that makes use of known structure (like sparsity, permutation, etc). These LinearOperator objects are modeled after [scipy Linear Operators](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.LinearOperator.html) but adapted to be compatible with jax and with some additional features.\n",
"For larger representations our solver uses an iterative method that benefits from faster multiplies with the generators. Instead of specifying the generators using dense matrices, you can specify them as [``LinearOperator``](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/linear_operators.py) objects in a way that makes use of known structure (like sparsity, permutation, etc). These LinearOperator objects are modeled after [scipy Linear Operators](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.LinearOperator.html) but adapted to be compatible with jax and with some additional features.\n",
"\n",
"Returning to the alternating group example, we can specify the generators as permutation operators directly. There are many useful LinearOperators implemented in [`LinearOperator`](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/linear_operators.py) which we recommend using if available, but we will go through the minimum steps for implementing a new operator like Permutation as an example.\n",
"Returning to the alternating group example, we can specify the generators as permutation operators directly. There are many useful LinearOperators implemented in [``LinearOperator``](https://github.com/mfinzi/equivariant-MLP/blob/master/emlp/solver/linear_operators.py) which we recommend using if available, but we will go through the minimum steps for implementing a new operator like Permutation as an example.\n",
"\n",
"Note that you need to be using quite large representations before any speedups will be felt due to the increased compile times with Jax (we are hoping to speed this up)."
]
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/4new_representations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As a first example, we show one can implement the real irreducible representations of the group SO(2). All of irreducible representations $\\psi_n$ of SO(2) are $2$-dimensional (except for $\\psi_0$ which is the same as [`Scalar`](https://emlp.readthedocs.io/en/latest/package/emlp.solver.representation.html#emlp.models.solver.representation.Scalar) $= \\mathbb{R} = \\psi_0$). These representations can be written $\\psi_n(R_\\theta) = \\begin{bmatrix}\\cos(n\\theta) &\\sin(n\\theta)\\\\-\\sin(n\\theta) & \\cos(n\\theta) \\end{bmatrix}$ or simply: $\\psi_n(R) = R^n$."
"As a first example, we show one can implement the real irreducible representations of the group SO(2). All of irreducible representations $\\psi_n$ of SO(2) are $2$-dimensional (except for $\\psi_0$ which is the same as [Scalar](https://emlp.readthedocs.io/en/latest/package/emlp.solver.representation.html#emlp.models.solver.representation.Scalar) $= \\mathbb{R} = \\psi_0$). These representations can be written $\\psi_n(R_\\theta) = \\begin{bmatrix}\\cos(n\\theta) &\\sin(n\\theta)\\\\-\\sin(n\\theta) & \\cos(n\\theta) \\end{bmatrix}$ or simply: $\\psi_n(R) = R^n$."
]
},
{
Expand Down

0 comments on commit 912a04c

Please sign in to comment.