Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Qualcomm-AI-research/geometric-algebra-transformer
/ functions
Functions
452 in github.com/Qualcomm-AI-research/geometric-algebra-transformer
⨍
Functions
452
◇
Types & classes
61
↳
Endpoints
4
Method
extract_from_ga
Embeds raw inputs into the geometric algebra (+ scalar) representation. To be implemented by subclasses. Parameters --------
tests_regression/regression_datasets/translation_norm.py:79
Method
extract_from_ga
Embeds raw inputs into the geometric algebra (+ scalar) representation. To be implemented by subclasses. Parameters --------
tests_regression/regression_datasets/translate_point.py:82
Method
extract_from_ga
Embeds raw inputs into the geometric algebra (+ scalar) representation. To be implemented by subclasses. Parameters --------
tests_regression/regression_datasets/points_distance.py:82
Method
extract_from_ga
Extracts the predicted wall shear stress from the output multivectors. We parameterize the wall shear stress as translation-invariant vectors
gatr/experiments/arteries/wrappers.py:128
Method
extract_from_ga
Extracts raw outputs from the GATr multivector + scalar outputs. We parameterize the predicted final positions as points. Parameters
gatr/experiments/nbody/wrappers.py:101
Method
forward
Forward pass of the Xformers model.
tests_regression/regression_helpers.py:30
Method
forward
Forward pass. Parameters ---------- inputs : torch.Tensor with shape (..., 16) Input multivectors. Retur
gatr/baselines/gcan.py:143
Method
forward
Forward pass.
gatr/baselines/gcan.py:211
Method
forward
Forward pass.
gatr/baselines/gcan.py:295
Method
forward
Forward pass of baseline MLP.
gatr/baselines/mlp.py:34
Method
forward
Forward pass. Parameters ---------- inputs : Tensor Input data Returns ------- outputs :
gatr/baselines/transformer.py:25
Method
forward
Forward pass. Returns ------- q : Tensor Queries k : Tensor Keys v : Tensor
gatr/baselines/transformer.py:59
Method
forward
Forward pass. Parameters ---------- inputs : Tensor Input data Returns ------- q : Tenso
gatr/baselines/transformer.py:101
Method
forward
Forward pass. Parameters ---------- inputs : Tensor Input data attention_mask : None or Tensor or xformer
gatr/baselines/transformer.py:179
Method
forward
Forward pass. Parameters ---------- inputs : Tensor Input data attention_mask : None or Tensor or xformer
gatr/baselines/transformer.py:297
Method
forward
Forward pass. Parameters ---------- inputs : Tensor with shape (..., num_items, num_channels) Input data
gatr/baselines/transformer.py:387
Method
forward
Forward pass. Parameters ---------- inputs : Tensor with shape (..., num_items1, num_items2, num_channels) Input
gatr/baselines/transformer.py:475
Method
forward
Forward pass.
gatr/baselines/segnn.py:108
Method
forward
Compute compiled linear map. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16)
gatr/utils/compile_linear.py:50
Method
forward
Forward pass of the network. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16)
gatr/nets/gatr.py:149
Method
forward
Forward pass of the network. Parameters ---------- multivectors : Tensor with shape (..., num_items_1, num_items_2, in_mv_cha
gatr/nets/axial_gatr.py:116
Method
forward
Wrapped forward pass pass. Parses inputs into GA + scalar representation, calls the forward pass of the wrapped net, and extracts the
gatr/experiments/base_wrapper.py:50
Method
forward
Wrapped forward pass.
gatr/experiments/arteries/wrappers.py:46
Method
forward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:153
Method
forward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:192
Method
forward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:305
Method
forward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:416
Method
forward
Maps input multivectors and scalars using the most general equivariant linear map. The result is again multivectors and scalars. For
gatr/layers/linear.py:128
Method
forward
Forward pass. Applies dropout. Parameters ---------- multivectors : torch.Tensor with shape (..., 16) Multivector
gatr/layers/dropout.py:26
Method
forward
Forward pass of the transformer block. Inputs are first processed by a block consisting of LayerNorm, multi-head geometric self-atten
gatr/layers/gatr_block.py:86
Method
forward
Forward pass. Computes equivariant LayerNorm for multivectors. Parameters ---------- multivectors : torch.Tensor with shape (
gatr/layers/layer_norm.py:44
Method
forward
Computes rotary embeddings along `self.item_dim` and applies them to inputs. The inputs are usually scalar queries and keys. Assumes
gatr/layers/attention/positional_encoding.py:61
Method
forward
Forward pass. Parameters ---------- inputs : torch.Tensor Multivector inputs scalars : torch.Tensor
gatr/layers/attention/qkv.py:32
Method
forward
Forward pass. Parameters ---------- inputs : torch.Tensor Multivector inputs scalars : torch.Tensor
gatr/layers/attention/qkv.py:135
Method
forward
Computes forward pass on inputs with shape `(..., items, channels, 16)`. The result is the following: ``` # For each head
gatr/layers/attention/self_attention.py:71
Method
forward
Forward pass through geometric attention. Given multivector and scalar queries, keys, and values, this forward pass computes: ```
gatr/layers/attention/attention.py:46
Method
forward
Computes f(x_0) * x for multivector x, where f is GELU, ReLU, or sigmoid. f is chosen depending on self.nonlinearity. Parameters
gatr/layers/mlp/nonlinearities.py:39
Method
forward
Forward pass. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16) Input multiv
gatr/layers/mlp/mlp.py:71
Method
forward
Forward pass. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16) Input multiv
gatr/layers/mlp/geometric_bilinears.py:81
Function
gated_relu
Pin-equivariant gated ReLU nonlinearity. Given multivector input x and scalar input gates (with matching batch dimensions), computes ReLU(gat
gatr/primitives/nonlinearities.py:10
Function
gated_sigmoid
Pin-equivariant gated sigmoid nonlinearity. Given multivector input x and scalar input gates (with matching batch dimensions), computes sigmo
gatr/primitives/nonlinearities.py:34
Function
gatr_factory
Factory function for a GATr model.
tests_regression/test_regression.py:24
Method
hidden_mv_channels
Returns the number of hidden multivector channels.
gatr/layers/attention/config.py:72
Method
hidden_s_channels
Returns the number of hidden scalar channels.
gatr/layers/attention/config.py:81
Method
load_process_hdf5
Wrap super method with adding shape id.
gatr/experiments/arteries/dataset.py:17
Method
message
Constructs message.
gatr/baselines/gcan.py:215
Function
minimum_autocast_precision
Decorator that ensures input tensors are autocast to a minimum precision. Only has an effect in autocast-enabled regions. Otherwise, does not cha
gatr/utils/misc.py:168
Function
mv_in
Multivector input fixture for testing
tests/gatr/layers/test_gatr_block.py:42
Function
pin_invariants
Computes five invariants from multivectors: scalar component, norms of the four other grades. NOTE: this primitive is not used widely in our arch
gatr/primitives/invariants.py:97
Method
register_hook
Registers a hook. Hooks are functions called either at a specific step or every n steps during training.
gatr/experiments/base_experiment.py:341
Method
rotate_sample
Rotate data sample with pre-sampled rotation matrices.
gatr/experiments/arteries/experiment.py:48
Function
s_in
Scalar input fixture for testing
tests/gatr/layers/test_gatr_block.py:48
Function
test_3d_object_embedding_consistency
Tests whether 3D point embeddings into multivectors are cycle consistent.
tests/gatr/interface/test_object.py:19
Function
test_3d_object_two_vec_embedding_consistency
Tests whether 3D point embeddings in the two-vec parameterizations into multivectors are cycle consistent.
tests/gatr/interface/test_object.py:33
Function
test_apply_rotary_positional_encoding
Tests ApplyRotaryPositionalEncoding for consistency.
tests/gatr/layers/test_positional_encoding.py:14
Function
test_attention_equivariance
Tests the SelfAttention layer for Pin equivariance, with scalar inputs.
tests/gatr/layers/test_cross_attention.py:21
Function
test_attention_equivariance
Tests the SelfAttention layer for Pin equivariance, with scalar inputs.
tests/gatr/layers/test_attention.py:18
Function
test_axial_gatr_equivariance
Tests AxialGATr for equivariance.
tests/gatr/nets/test_axial_gatr.py:71
Function
test_axial_gatr_shape
Tests the output shape of AxialGATr.
tests/gatr/nets/test_axial_gatr.py:22
Function
test_axial_transformer_shape
Tests the output shape of BaselineAxialTransformer.
tests/gatr/baselines/test_transformer.py:47
Function
test_block_stack
Test block stacking.
tests/gatr/utils/test_tensors.py:32
Function
test_compilation_substitution
Test in lienar compilation in integration. Verify that all EquiLinear submodules are substitued by CompiledLinear. Verify that the forward pa
tests/gatr/utils/test_compile_linear.py:43
Function
test_compile_linear_equivalence
Test equivalence of the EquiLinear and its compiled version.
tests/gatr/utils/test_compile_linear.py:21
Function
test_compiled_linear_backward
Test we can properly run a backwards pass.
tests/gatr/utils/test_compile_linear.py:69
Function
test_cross_attention
Test cross attention shapes.
tests/gatr/layers/test_cross_attention.py:60
Function
test_dropout_equivariance
Tests GradeDropout for equivariance.
tests/gatr/layers/test_dropout.py:77
Function
test_dropout_equivariance
Tests the grade_dropout() primitive for equivariance (at test time).
tests/gatr/primitives/test_dropout.py:49
Function
test_dropout_expectation
Tests GradeDropout for correct expectation.
tests/gatr/layers/test_dropout.py:52
Function
test_dropout_expectation
Tests that grade_dropout() has train-time and test-time behaviour that is identical in expectation.
tests/gatr/primitives/test_dropout.py:32
Function
test_dropout_shape
Tests GradeDropout for shape correctness.
tests/gatr/layers/test_dropout.py:13
Function
test_dropout_shape
Tests grade_dropout() map for shape correctness.
tests/gatr/primitives/test_dropout.py:13
Function
test_dropout_trivial_limit
Tests that GradeDropout does nothing when p = 0.
tests/gatr/layers/test_dropout.py:32
Function
test_dropout_trivial_limit
Tests that grade_dropout() does nothing when p = 0.
tests/gatr/primitives/test_dropout.py:22
Function
test_dual_correctness
Tests that dual() computes the correct dual.
tests/gatr/primitives/test_dual.py:25
Function
test_e2e_cached_path
Checks that torch.einsum and cached_einsum deliver the same results.
tests/gatr/utils/test_einsum.py:65
Function
test_efficient_join_implementation_equivalence
Tests that efficient_reference_dual() and explicit_reference_dual() agree.
tests/gatr/primitives/test_dual.py:49
Function
test_embed_extract_pluecker_ray
Test whether embed and extract is the identity.
tests/gatr/interface/test_ray.py:23
Function
test_embed_pluecker_ray
Test whether ray matches the join construction.
tests/gatr/interface/test_ray.py:9
Function
test_embed_scalar
Tests that embed_scalar() embeds scalars into multivectors correctly.
tests/gatr/interface/test_scalar.py:11
Function
test_equi_layer_norm_correctness
Tests whether the output of equi_layer_norm has the correct variance.
tests/gatr/primitives/test_normalization.py:14
Function
test_equi_layer_norm_equivariance
Tests equi_layer_norm() primitive for equivariance.
tests/gatr/primitives/test_normalization.py:23
Function
test_equi_layer_norm_layer_correctness
Tests whether the output of EquiLayerNorm has the correct variance.
tests/gatr/layers/test_normalization.py:13
Function
test_equi_layer_norm_layer_equivariance
Tests EquiLayerNorm() for equivariance.
tests/gatr/layers/test_normalization.py:26
Function
test_expand_pairwise
Test expand pairwise.
tests/gatr/utils/test_tensors.py:21
Function
test_gated_nonlin_equivariance
Tests an identity map for equivariance (testing the test).
tests/gatr/primitives/test_nonlinearities.py:15
Function
test_gatr_block_autocast
Tests that AMP works correctly in GATr blocks
tests/gatr/layers/test_gatr_block.py:54
Function
test_gatr_checkpoint_block_and_subblocks
Tests that specifying block and MLP / attention checkpointing raises a ValueError.
tests/gatr/nets/test_gatr.py:241
Function
test_gatr_checkpoint_blocks_checkpoint
Tests that specifying both checkpoint and checkpoint_blocks raises a ValueError.
tests/gatr/nets/test_gatr.py:223
Function
test_gatr_checkpoint_blocks_deprecation_warning
Tests that the checkpoint_blocks kwarg raises a DeprecationWarning.
tests/gatr/nets/test_gatr.py:206
Function
test_gatr_equivariance
Tests GATr for equivariance.
tests/gatr/nets/test_gatr.py:80
Function
test_gatr_shape
Tests the output shape of EquiTransformer.
tests/gatr/nets/test_gatr.py:25
Function
test_gatr_state_dict
Tests that GATr output is invariant under seeding and saving and loading its state dict.
tests/gatr/nets/test_gatr.py:131
Function
test_gelu_division
Test that gated_gelu_divide() is equal to gelu(x)/x.
tests/gatr/primitives/test_nonlinearities.py:21
Function
test_geo_mlp_equivariance
Tests GeoMLP() for Pin equivariance.
tests/gatr/layers/test_mlp.py:32
Function
test_geo_mlp_shape
Tests the output shape of GeoMLP().
tests/gatr/layers/test_mlp.py:16
Function
test_geometric_attention_equivariance
Tests geometric_attention() for Pin equivariance.
tests/gatr/primitives/test_attention.py:156
Function
test_geometric_attention_proximity
Tests that with the right weights, geometric_attention attends to nearby points.
tests/gatr/primitives/test_attention.py:194
Function
test_geometric_attention_shape
Tests that outputs of geometric_attention() have correct shape.
tests/gatr/primitives/test_attention.py:91
Function
test_geometric_bilinears_equivariance
Tests GeometricBilinear() for equivariance.
tests/gatr/layers/test_geometric_bilinears.py:15
Function
test_geometric_cross_attention
Test cross attention shapes.
tests/gatr/primitives/test_attention.py:220
← previous
next →
301–400 of 452, ranked by callers