Clifford Kernels¤
We provide 1D, 2D, 3D Clifford kernels for different algebras. Additionally, we provide complex, quaternion, and octonion kernels -- those are specific instances of those kernels.
get_1d_clifford_kernel(w, g)
¤
Clifford kernel for 1d Clifford algebras, g = [-1] corresponds to a complex number kernel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
g |
Tensor
|
Signature of Clifford algebra. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Wrong encoding/decoding options provided. |
Returns:
Type | Description |
---|---|
Tuple[int, Tensor]
|
Number of output blades, weight output of shape |
Source code in cliffordlayers/cliffordkernels.py
get_2d_clifford_kernel(w, g)
¤
Clifford kernel for 2d Clifford algebras, g = [-1, -1] corresponds to a quaternion kernel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
g |
Tensor
|
Signature of Clifford algebra. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Wrong encoding/decoding options provided. |
Returns:
Type | Description |
---|---|
Tuple[int, Tensor]
|
Number of output blades, weight output of shape |
Source code in cliffordlayers/cliffordkernels.py
get_2d_clifford_rotation_kernel(w, g)
¤
Rotational Clifford kernel for 2d Clifford algebras, the vector part corresponds to quaternion rotation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
g |
Tensor
|
Signature of Clifford algebra. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Wrong encoding/decoding options provided. |
Returns:
Type | Description |
---|---|
Tuple[int, Tensor]
|
Number of output blades, weight output of shape |
Source code in cliffordlayers/cliffordkernels.py
get_3d_clifford_kernel(w, g)
¤
Clifford kernel for 3d Clifford algebras, g = [-1, -1, -1] corresponds to an octonion kernel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
g |
Tensor
|
Signature of Clifford algebra. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
Wrong encoding/decoding options provided. |
Returns:
Type | Description |
---|---|
Tuple[int, Tensor]
|
Number of output blades, weight output of dimension |
Source code in cliffordlayers/cliffordkernels.py
get_complex_kernel(w)
¤
Complex kernel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
Returns:
Type | Description |
---|---|
Tensor
|
Weight output of shape |
Source code in cliffordlayers/cliffordkernels.py
get_octonion_kernel(w)
¤
Octonion kernels.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
Returns:
Type | Description |
---|---|
Tensor
|
Weight output of shape |
Source code in cliffordlayers/cliffordkernels.py
get_quaternion_kernel(w)
¤
Quaternion kernel.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
Returns:
Type | Description |
---|---|
Tensor
|
Weight output of shape |
Source code in cliffordlayers/cliffordkernels.py
get_quaternion_rotation_kernel(w)
¤
Quaternion rotation, taken mostly from https://github.com/Orkis-Research/Pytorch-Quaternion-Neural-Networks
Parameters:
Name | Type | Description | Default |
---|---|---|---|
w |
Union[tuple, list, Tensor, Parameter, ParameterList]
|
Weight input of shape |
required |
Returns:
Type | Description |
---|---|
Tensor
|
Quaternion weight output of dimension |