Skip to content

Commit

Permalink
colab sync
Browse files Browse the repository at this point in the history
  • Loading branch information
mfinzi committed Mar 21, 2021
1 parent 09cf46b commit 655634e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/notebooks/colabs/1quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
}
],
"source": [
"G = Z(3)*Z(4) #[Not recommended way of building product groups, there is a faster path described later]\n",
"G = Z(3)*Z(4) #[Not recommended way of building product groups, there is a faster way shown in section 5]\n",
"repin = V(G)\n",
"repout = V(G)\n",
"vis(repin,repout)"
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/colabs/2building_a_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For convenience, we store in the dataset the types for the input and the output. `5V⁰` are the $5$ mass values and `5V` are the position vectors of those masses, `V²` is the matrix type for the output, equivalent to $T_2$. To initialize the [EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.models.mlp.html#emlp.models.EMLP), we just need these input and output representations, the symmetry group, and the size of the network as parametrized by number of layers and number of channels (the dimension of the feature representation)."
"For convenience, we store in the dataset the types for the input and the output. `5V⁰` are the $5$ mass values and `5V` are the position vectors of those masses, `V²` is the matrix type for the output, equivalent to $T_2$. To initialize the [EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.nn.html#emlp.nn.EMLP), we just need these input and output representations, the symmetry group, and the size of the network as parametrized by number of layers and number of channels (the dimension of the feature representation)."
]
},
{
Expand Down Expand Up @@ -368,7 +368,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The representations of the hidden layers (taking place of the number of channels in a standard MLP) is by default given by this `uniform_rep` shown above. Unlike this pedagogical implementation you can specify the representation of the hidden layers directly in the [full EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.models.mlp.html#emlp.models.EMLP) by feeding in a representation to the `ch` argument, or even a list of representations to specify each hidden layer."
"The representations of the hidden layers (taking place of the number of channels in a standard MLP) is by default given by this `uniform_rep` shown above. Unlike this pedagogical implementation you can specify the representation of the hidden layers directly in the [full EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.nn.html#emlp.nn.EMLP) by feeding in a representation to the `ch` argument, or even a list of representations to specify each hidden layer."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/colabs/3new_groups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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` 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` 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/groups.py)."
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/colabs/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 our solver treats objects very generally, implementing new representations is surprisingly easy. To implement a new [Representation](https://emlp.readthedocs.io/en/latest/package/emlp.solver.representation.html#emlp.models.solver.representation.Rep) you need to implement `size()` which is the dimension of the representation, `rho(M)` which is a mapping from the group elements to the representation matrix, as well `__eq__` and `__hash__` to distinguish different representations. It's also a good idea to implement a `__str__` function to improve readability. All representations implemented this way should have the `.G` attribute specifying the symmetry group.\n",
"As our solver treats objects very generally, implementing new representations is surprisingly easy. To implement a new [Representation](https://emlp.readthedocs.io/en/latest/package/emlp.solver.reps.html#emlp.reps.Rep) you need to implement `size()` which is the dimension of the representation, `rho(M)` which is a mapping from the group elements to the representation matrix, as well `__eq__` and `__hash__` to distinguish different representations. It's also a good idea to implement a `__str__` function to improve readability. All representations implemented this way should have the `.G` attribute specifying the symmetry group.\n",
"\n",
"The implementation also requires you to specify whether the representation is regular (whether `rho(M)` outputs a permutaiton matrix) with the `is_regular` attribute, and also the `.T` property that returns the dual of the representation. We plan on removing these two requirements in a later release."
]
Expand All @@ -43,7 +43,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.reps.html#emlp.reps.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 Expand Up @@ -203,7 +203,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2: PseudoScalars, PseudoVectors, ..."
"## Example 2: PseudoScalars, PseudoVectors, and PseudoTensors"
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions docs/notebooks/colabs/all.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
}
],
"source": [
"G = Z(3)*Z(4) #[Not recommended way of building product groups, there is a faster path described later]\n",
"G = Z(3)*Z(4) #[Not recommended way of building product groups, there is a faster way shown in section 5]\n",
"repin = V(G)\n",
"repout = V(G)\n",
"vis(repin,repout)"
Expand Down Expand Up @@ -937,7 +937,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For convenience, we store in the dataset the types for the input and the output. `5V⁰` are the $5$ mass values and `5V` are the position vectors of those masses, `V²` is the matrix type for the output, equivalent to $T_2$. To initialize the [EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.models.mlp.html#emlp.models.EMLP), we just need these input and output representations, the symmetry group, and the size of the network as parametrized by number of layers and number of channels (the dimension of the feature representation)."
"For convenience, we store in the dataset the types for the input and the output. `5V⁰` are the $5$ mass values and `5V` are the position vectors of those masses, `V²` is the matrix type for the output, equivalent to $T_2$. To initialize the [EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.nn.html#emlp.nn.EMLP), we just need these input and output representations, the symmetry group, and the size of the network as parametrized by number of layers and number of channels (the dimension of the feature representation)."
]
},
{
Expand Down Expand Up @@ -1184,7 +1184,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The representations of the hidden layers (taking place of the number of channels in a standard MLP) is by default given by this `uniform_rep` shown above. Unlike this pedagogical implementation you can specify the representation of the hidden layers directly in the [full EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.models.mlp.html#emlp.models.EMLP) by feeding in a representation to the `ch` argument, or even a list of representations to specify each hidden layer."
"The representations of the hidden layers (taking place of the number of channels in a standard MLP) is by default given by this `uniform_rep` shown above. Unlike this pedagogical implementation you can specify the representation of the hidden layers directly in the [full EMLP](https://emlp.readthedocs.io/en/latest/package/emlp.nn.html#emlp.nn.EMLP) by feeding in a representation to the `ch` argument, or even a list of representations to specify each hidden layer."
]
},
{
Expand Down Expand Up @@ -1246,7 +1246,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` 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` 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/groups.py)."
]
},
{
Expand Down Expand Up @@ -1662,7 +1662,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As our solver treats objects very generally, implementing new representations is surprisingly easy. To implement a new [Representation](https://emlp.readthedocs.io/en/latest/package/emlp.solver.representation.html#emlp.models.solver.representation.Rep) you need to implement `size()` which is the dimension of the representation, `rho(M)` which is a mapping from the group elements to the representation matrix, as well `__eq__` and `__hash__` to distinguish different representations. It's also a good idea to implement a `__str__` function to improve readability. All representations implemented this way should have the `.G` attribute specifying the symmetry group.\n",
"As our solver treats objects very generally, implementing new representations is surprisingly easy. To implement a new [Representation](https://emlp.readthedocs.io/en/latest/package/emlp.solver.reps.html#emlp.reps.Rep) you need to implement `size()` which is the dimension of the representation, `rho(M)` which is a mapping from the group elements to the representation matrix, as well `__eq__` and `__hash__` to distinguish different representations. It's also a good idea to implement a `__str__` function to improve readability. All representations implemented this way should have the `.G` attribute specifying the symmetry group.\n",
"\n",
"The implementation also requires you to specify whether the representation is regular (whether `rho(M)` outputs a permutaiton matrix) with the `is_regular` attribute, and also the `.T` property that returns the dual of the representation. We plan on removing these two requirements in a later release."
]
Expand All @@ -1678,7 +1678,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.reps.html#emlp.reps.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 Expand Up @@ -1838,7 +1838,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2: PseudoScalars, PseudoVectors, ..."
"## Example 2: PseudoScalars, PseudoVectors, and PseudoTensors"
]
},
{
Expand Down

0 comments on commit 655634e

Please sign in to comment.