MCPcopy Create free account

hub / github.com/Qualcomm-AI-research/geometric-algebra-transformer / functions

Functions452 in github.com/Qualcomm-AI-research/geometric-algebra-transformer

Methodextract_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
Methodextract_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
Methodextract_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
Methodextract_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
Methodextract_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
Methodforward
Forward pass of the Xformers model.
tests_regression/regression_helpers.py:30
Methodforward
Forward pass. Parameters ---------- inputs : torch.Tensor with shape (..., 16) Input multivectors. Retur
gatr/baselines/gcan.py:143
Methodforward
Forward pass.
gatr/baselines/gcan.py:211
Methodforward
Forward pass.
gatr/baselines/gcan.py:295
Methodforward
Forward pass of baseline MLP.
gatr/baselines/mlp.py:34
Methodforward
Forward pass. Parameters ---------- inputs : Tensor Input data Returns ------- outputs :
gatr/baselines/transformer.py:25
Methodforward
Forward pass. Returns ------- q : Tensor Queries k : Tensor Keys v : Tensor
gatr/baselines/transformer.py:59
Methodforward
Forward pass. Parameters ---------- inputs : Tensor Input data Returns ------- q : Tenso
gatr/baselines/transformer.py:101
Methodforward
Forward pass. Parameters ---------- inputs : Tensor Input data attention_mask : None or Tensor or xformer
gatr/baselines/transformer.py:179
Methodforward
Forward pass. Parameters ---------- inputs : Tensor Input data attention_mask : None or Tensor or xformer
gatr/baselines/transformer.py:297
Methodforward
Forward pass. Parameters ---------- inputs : Tensor with shape (..., num_items, num_channels) Input data
gatr/baselines/transformer.py:387
Methodforward
Forward pass. Parameters ---------- inputs : Tensor with shape (..., num_items1, num_items2, num_channels) Input
gatr/baselines/transformer.py:475
Methodforward
Forward pass.
gatr/baselines/segnn.py:108
Methodforward
Compute compiled linear map. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16)
gatr/utils/compile_linear.py:50
Methodforward
Forward pass of the network. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16)
gatr/nets/gatr.py:149
Methodforward
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
Methodforward
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
Methodforward
Wrapped forward pass.
gatr/experiments/arteries/wrappers.py:46
Methodforward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:153
Methodforward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:192
Methodforward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:305
Methodforward
Wrapped forward pass. Parameters ---------- inputs : torch.Tensor Raw inputs, as given by dataset. Retur
gatr/experiments/nbody/wrappers.py:416
Methodforward
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
Methodforward
Forward pass. Applies dropout. Parameters ---------- multivectors : torch.Tensor with shape (..., 16) Multivector
gatr/layers/dropout.py:26
Methodforward
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
Methodforward
Forward pass. Computes equivariant LayerNorm for multivectors. Parameters ---------- multivectors : torch.Tensor with shape (
gatr/layers/layer_norm.py:44
Methodforward
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
Methodforward
Forward pass. Parameters ---------- inputs : torch.Tensor Multivector inputs scalars : torch.Tensor
gatr/layers/attention/qkv.py:32
Methodforward
Forward pass. Parameters ---------- inputs : torch.Tensor Multivector inputs scalars : torch.Tensor
gatr/layers/attention/qkv.py:135
Methodforward
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
Methodforward
Forward pass through geometric attention. Given multivector and scalar queries, keys, and values, this forward pass computes: ```
gatr/layers/attention/attention.py:46
Methodforward
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
Methodforward
Forward pass. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16) Input multiv
gatr/layers/mlp/mlp.py:71
Methodforward
Forward pass. Parameters ---------- multivectors : torch.Tensor with shape (..., in_mv_channels, 16) Input multiv
gatr/layers/mlp/geometric_bilinears.py:81
Functiongated_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
Functiongated_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
Functiongatr_factory
Factory function for a GATr model.
tests_regression/test_regression.py:24
Methodhidden_mv_channels
Returns the number of hidden multivector channels.
gatr/layers/attention/config.py:72
Methodhidden_s_channels
Returns the number of hidden scalar channels.
gatr/layers/attention/config.py:81
Methodload_process_hdf5
Wrap super method with adding shape id.
gatr/experiments/arteries/dataset.py:17
Methodmessage
Constructs message.
gatr/baselines/gcan.py:215
Functionminimum_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
Functionmv_in
Multivector input fixture for testing
tests/gatr/layers/test_gatr_block.py:42
Functionpin_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
Methodregister_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
Methodrotate_sample
Rotate data sample with pre-sampled rotation matrices.
gatr/experiments/arteries/experiment.py:48
Functions_in
Scalar input fixture for testing
tests/gatr/layers/test_gatr_block.py:48
Functiontest_3d_object_embedding_consistency
Tests whether 3D point embeddings into multivectors are cycle consistent.
tests/gatr/interface/test_object.py:19
Functiontest_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
Functiontest_apply_rotary_positional_encoding
Tests ApplyRotaryPositionalEncoding for consistency.
tests/gatr/layers/test_positional_encoding.py:14
Functiontest_attention_equivariance
Tests the SelfAttention layer for Pin equivariance, with scalar inputs.
tests/gatr/layers/test_cross_attention.py:21
Functiontest_attention_equivariance
Tests the SelfAttention layer for Pin equivariance, with scalar inputs.
tests/gatr/layers/test_attention.py:18
Functiontest_axial_gatr_equivariance
Tests AxialGATr for equivariance.
tests/gatr/nets/test_axial_gatr.py:71
Functiontest_axial_gatr_shape
Tests the output shape of AxialGATr.
tests/gatr/nets/test_axial_gatr.py:22
Functiontest_axial_transformer_shape
Tests the output shape of BaselineAxialTransformer.
tests/gatr/baselines/test_transformer.py:47
Functiontest_block_stack
Test block stacking.
tests/gatr/utils/test_tensors.py:32
Functiontest_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
Functiontest_compile_linear_equivalence
Test equivalence of the EquiLinear and its compiled version.
tests/gatr/utils/test_compile_linear.py:21
Functiontest_compiled_linear_backward
Test we can properly run a backwards pass.
tests/gatr/utils/test_compile_linear.py:69
Functiontest_cross_attention
Test cross attention shapes.
tests/gatr/layers/test_cross_attention.py:60
Functiontest_dropout_equivariance
Tests GradeDropout for equivariance.
tests/gatr/layers/test_dropout.py:77
Functiontest_dropout_equivariance
Tests the grade_dropout() primitive for equivariance (at test time).
tests/gatr/primitives/test_dropout.py:49
Functiontest_dropout_expectation
Tests GradeDropout for correct expectation.
tests/gatr/layers/test_dropout.py:52
Functiontest_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
Functiontest_dropout_shape
Tests GradeDropout for shape correctness.
tests/gatr/layers/test_dropout.py:13
Functiontest_dropout_shape
Tests grade_dropout() map for shape correctness.
tests/gatr/primitives/test_dropout.py:13
Functiontest_dropout_trivial_limit
Tests that GradeDropout does nothing when p = 0.
tests/gatr/layers/test_dropout.py:32
Functiontest_dropout_trivial_limit
Tests that grade_dropout() does nothing when p = 0.
tests/gatr/primitives/test_dropout.py:22
Functiontest_dual_correctness
Tests that dual() computes the correct dual.
tests/gatr/primitives/test_dual.py:25
Functiontest_e2e_cached_path
Checks that torch.einsum and cached_einsum deliver the same results.
tests/gatr/utils/test_einsum.py:65
Functiontest_efficient_join_implementation_equivalence
Tests that efficient_reference_dual() and explicit_reference_dual() agree.
tests/gatr/primitives/test_dual.py:49
Functiontest_embed_extract_pluecker_ray
Test whether embed and extract is the identity.
tests/gatr/interface/test_ray.py:23
Functiontest_embed_pluecker_ray
Test whether ray matches the join construction.
tests/gatr/interface/test_ray.py:9
Functiontest_embed_scalar
Tests that embed_scalar() embeds scalars into multivectors correctly.
tests/gatr/interface/test_scalar.py:11
Functiontest_equi_layer_norm_correctness
Tests whether the output of equi_layer_norm has the correct variance.
tests/gatr/primitives/test_normalization.py:14
Functiontest_equi_layer_norm_equivariance
Tests equi_layer_norm() primitive for equivariance.
tests/gatr/primitives/test_normalization.py:23
Functiontest_equi_layer_norm_layer_correctness
Tests whether the output of EquiLayerNorm has the correct variance.
tests/gatr/layers/test_normalization.py:13
Functiontest_equi_layer_norm_layer_equivariance
Tests EquiLayerNorm() for equivariance.
tests/gatr/layers/test_normalization.py:26
Functiontest_expand_pairwise
Test expand pairwise.
tests/gatr/utils/test_tensors.py:21
Functiontest_gated_nonlin_equivariance
Tests an identity map for equivariance (testing the test).
tests/gatr/primitives/test_nonlinearities.py:15
Functiontest_gatr_block_autocast
Tests that AMP works correctly in GATr blocks
tests/gatr/layers/test_gatr_block.py:54
Functiontest_gatr_checkpoint_block_and_subblocks
Tests that specifying block and MLP / attention checkpointing raises a ValueError.
tests/gatr/nets/test_gatr.py:241
Functiontest_gatr_checkpoint_blocks_checkpoint
Tests that specifying both checkpoint and checkpoint_blocks raises a ValueError.
tests/gatr/nets/test_gatr.py:223
Functiontest_gatr_checkpoint_blocks_deprecation_warning
Tests that the checkpoint_blocks kwarg raises a DeprecationWarning.
tests/gatr/nets/test_gatr.py:206
Functiontest_gatr_equivariance
Tests GATr for equivariance.
tests/gatr/nets/test_gatr.py:80
Functiontest_gatr_shape
Tests the output shape of EquiTransformer.
tests/gatr/nets/test_gatr.py:25
Functiontest_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
Functiontest_gelu_division
Test that gated_gelu_divide() is equal to gelu(x)/x.
tests/gatr/primitives/test_nonlinearities.py:21
Functiontest_geo_mlp_equivariance
Tests GeoMLP() for Pin equivariance.
tests/gatr/layers/test_mlp.py:32
Functiontest_geo_mlp_shape
Tests the output shape of GeoMLP().
tests/gatr/layers/test_mlp.py:16
Functiontest_geometric_attention_equivariance
Tests geometric_attention() for Pin equivariance.
tests/gatr/primitives/test_attention.py:156
Functiontest_geometric_attention_proximity
Tests that with the right weights, geometric_attention attends to nearby points.
tests/gatr/primitives/test_attention.py:194
Functiontest_geometric_attention_shape
Tests that outputs of geometric_attention() have correct shape.
tests/gatr/primitives/test_attention.py:91
Functiontest_geometric_bilinears_equivariance
Tests GeometricBilinear() for equivariance.
tests/gatr/layers/test_geometric_bilinears.py:15
Functiontest_geometric_cross_attention
Test cross attention shapes.
tests/gatr/primitives/test_attention.py:220
← previousnext →301–400 of 452, ranked by callers