MCPcopy Create free account

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

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

↓ 1 callersFunction_build_dist_basis
Compute basis features for queries and keys in the geometric SDP attention. Parameters ---------- device: torch.device Device.
gatr/primitives/attention.py:206
↓ 1 callersMethod_build_graph
Builds graph for a single sample.
gatr/experiments/nbody/wrappers.py:375
↓ 1 callersMethod_build_graphs
Builds graph for a full batch.
gatr/experiments/nbody/wrappers.py:366
↓ 1 callersMethod_compute_accelerations
Computes accelerations for a set of point masses according to Newtonian gravity.
gatr/experiments/nbody/simulator.py:207
↓ 1 callersFunction_compute_dualization
Constructs a tensor for the dual operation. Parameters ---------- device : torch.device Device dtype : torch.dtype Dt
gatr/primitives/dual.py:18
↓ 1 callersMethod_compute_embeddings
Computes position embeddings and stores them. The position embedding is computed along dimension `item_dim` of tensor `inputs` and is
gatr/layers/attention/positional_encoding.py:92
↓ 1 callersFunction_compute_grade_involution
Constructs a matrix that computes multivector grade involution. Parameters ---------- device : torch.device Device dtype : to
gatr/primitives/linear.py:88
↓ 1 callersMethod_compute_init_factors
Computes prefactors for the initialization. See self.reset_parameters().
gatr/layers/linear.py:234
↓ 1 callersFunction_compute_join_norm_idx
Constructs everything we need to compute norm(equi_norm(x,y)) in a memory-efficient way. Parameters ---------- threshold : float
gatr/primitives/dual.py:83
↓ 1 callersMethod_construct_reinserted_channels
Constructs input features that will be reinserted in every attention layer.
gatr/nets/gatr.py:213
↓ 1 callersMethod_create_model
Creates the model from the config. Returns ------- model : torch.nn.Module A randomly initialized model, followin
gatr/experiments/base_experiment.py:505
↓ 1 callersMethod_create_optimizer_and_scheduler
Creates optimizer and scheduler. Returns ------- optim : torch.optim.Optimizer Adam optimizer for the parameters
gatr/experiments/base_experiment.py:517
↓ 1 callersFunction_einsum_with_path
Computes einsum with a given contraction path.
gatr/utils/einsum.py:12
↓ 1 callersMethod_fully_connected_idx
Creates source and destination indices for a fully connected graph.
gatr/experiments/nbody/wrappers.py:388
↓ 1 callersFunction_get_cached_path_for_equation_and_shapes
Provides shape-based caching of the optimal contraction path.
gatr/utils/einsum.py:43
↓ 1 callersMethod_init_backend
Initializes device, dtype, and attention implementation.
gatr/experiments/base_experiment.py:349
↓ 1 callersMethod_init_multivectors
Weight initialization for maps to multivector outputs.
gatr/layers/linear.py:283
↓ 1 callersMethod_init_plt
Initializes matplotlib's rcparams to look good.
gatr/experiments/base_experiment.py:486
↓ 1 callersMethod_init_scalars
Weight initialization for maps to multivector outputs.
gatr/layers/linear.py:333
↓ 1 callersMethod_initialize_experiment
Initialize experiment folder (and plenty of other initialization thingies).
gatr/experiments/base_experiment.py:377
↓ 1 callersMethod_initialize_experiment_folder
Creates experiment folder.
gatr/experiments/base_experiment.py:403
↓ 1 callersMethod_initialize_mlflow
Initializes all things related to MLflow tracking.
gatr/experiments/base_experiment.py:448
↓ 1 callersMethod_load_data
Loads data from file and converts to input and output tensors.
gatr/experiments/nbody/dataset.py:39
↓ 1 callersMethod_log
Log to MLflow. Parameters ---------- loss : torch.Tensor Loss metrics : dict with str keys and float valu
gatr/experiments/base_experiment.py:701
↓ 1 callersMethod_make_net
PGA-MLP code as sent by David Ruhe.
gatr/baselines/gcan.py:95
↓ 1 callersMethod_mlp_block
MLP block.
gatr/layers/gatr_block.py:177
↓ 1 callersMethod_move_files
Use rope to move files.
docker/ext_packages/install_upstream_python_packages.py:141
↓ 1 callersMethod_optimizer_step
Optimizer step and gradient norm clipping.
gatr/experiments/base_experiment.py:627
↓ 1 callersMethod_post_step
(self, loss, metrics, grad_norm, step, val_data, val_loader)
gatr/experiments/base_experiment.py:593
↓ 1 callersMethod_prep_data
Data preparation during training loop, e.g. to move data to correct device and dtype.
gatr/experiments/arteries/experiment.py:105
↓ 1 callersMethod_reshape_data_after_even_blocks
(self, h, input_batch_dims)
gatr/baselines/transformer.py:552
↓ 1 callersMethod_reshape_data_after_even_blocks
(self, multivector, scalar, input_batch_dims)
gatr/nets/axial_gatr.py:245
↓ 1 callersMethod_reshape_data_after_odd_blocks
(self, h, input_batch_dims)
gatr/baselines/transformer.py:532
↓ 1 callersMethod_reshape_data_after_odd_blocks
(self, multivector, scalar, input_batch_dims)
gatr/nets/axial_gatr.py:219
↓ 1 callersMethod_reshape_data_before_even_blocks
(self, h)
gatr/baselines/transformer.py:542
↓ 1 callersMethod_reshape_data_before_even_blocks
(self, multivector, scalar)
gatr/nets/axial_gatr.py:233
↓ 1 callersMethod_reshape_data_before_odd_blocks
(self, h)
gatr/baselines/transformer.py:519
↓ 1 callersMethod_reshape_data_before_odd_blocks
(self, multivector, scalar)
gatr/nets/axial_gatr.py:203
↓ 1 callersMethod_rotate_half
Utility function that "rotates" a tensor, as required for rotary embeddings.
gatr/layers/attention/positional_encoding.py:126
↓ 1 callersMethod_sample_planet_velocities
Samples planet velocities around those that give stable circular orbits.
gatr/experiments/nbody/simulator.py:143
↓ 1 callersMethod_save_config
Stores the config in the experiment folder and tracks it with mlflow.
gatr/experiments/base_experiment.py:492
↓ 1 callersFunction_sdpa_graph_breaking
A helper function to isolate the graph-breaking parts of the attention (cf. decorator). TODO: This function can be dissolved once we get expand_p
gatr/primitives/attention.py:421
↓ 1 callersMethod_shift_and_rotate
Performs random E(3) transformations and permutations on given positions / velocities.
gatr/experiments/nbody/simulator.py:164
↓ 1 callersMethod_simulate
Evolves an initial state under Newtonian equations of motions.
gatr/experiments/nbody/simulator.py:192
↓ 1 callersMethod_sort_files_by_priority
Sorts files for priority refactoring. This is necessary as else rope will get this wrong in some cases: It can, for example, make a d
docker/ext_packages/install_upstream_python_packages.py:163
↓ 1 callersMethod_step
Everything that may happen per step.
gatr/experiments/base_experiment.py:573
↓ 1 callersMethodadd_init_files
Adds an `__init__.py` file for ever subfolder of checkout path (if missing).
docker/ext_packages/install_upstream_python_packages.py:112
↓ 1 callersMethodadd_new_pyproject_file
Adds a generic `pyproject.toml` file to the project root.
docker/ext_packages/install_upstream_python_packages.py:128
↓ 1 callersMethodapply_patches
Applies patch from a patch file, if provided upon instantiation.
docker/ext_packages/install_upstream_python_packages.py:107
↓ 1 callersFunctionblock_stack
Block diagonally stack tensors along dimensions dim1 and dim2.
gatr/utils/tensors.py:30
↓ 1 callersMethodbuild_attention_mask
Construct attention mask. Parameters ---------- inputs : torch.Tensor Raw inputs to wrapped network. mv :
gatr/experiments/base_wrapper.py:29
↓ 1 callersFunctioncheck_consistence_with_dual
Checks whether a callable computes the reversal of a multivector.
tests/helpers/geometric_algebra.py:98
↓ 1 callersFunctioncheck_consistence_with_geometric_product
Checks whether a callable computes the geometric product.
tests/helpers/geometric_algebra.py:22
↓ 1 callersFunctioncheck_consistence_with_grade_involution
Checks whether a callable computes the grade involution of a multivectors.
tests/helpers/geometric_algebra.py:80
↓ 1 callersFunctioncheck_consistence_with_outer_product
Checks whether a callable computes the outer product.
tests/helpers/geometric_algebra.py:42
↓ 1 callersFunctioncheck_consistence_with_reversal
Checks whether a callable computes the reversal of a multivector.
tests/helpers/geometric_algebra.py:62
↓ 1 callersMethodcheckout_commit
Checks out the commit hash provided upon instantiation.
docker/ext_packages/install_upstream_python_packages.py:102
↓ 1 callersMethodclone_from_upstream
Clones the git repository from the clone URL provided upon instantiation.
docker/ext_packages/install_upstream_python_packages.py:97
↓ 1 callersFunctioncompute_inner_product_mask
Constructs a bool array for the inner product calculation. The inner product of MVs is <~x y>_0, i.e. take the grade-0 component of the geometric
gatr/primitives/invariants.py:14
↓ 1 callersFunctioncount_nominal_flops_in_equi_linear
Computes the nominal FLOPs per token for an EquiLinear layer. We assume: - the number of tokens are large, so the token-independent contract
gatr/layers/linear.py:368
↓ 1 callersFunctionembed_3d_object
Embeds the pose of a 3D object PGA multivectors. The pose is given by a position and a orientation quaternion. The latter is assumed to follow
gatr/interface/object.py:15
↓ 1 callersFunctionembed_3d_object_two_vec
Embeds the pose of a 3D object in two-vec parameterization into the PGA. The inputs consist of the position of an object and two vectors that spe
gatr/interface/object.py:146
↓ 1 callersMethodembed_into_ga
Embeds raw inputs into the geometric algebra (+ scalar) representation. To be implemented by subclasses. Parameters --------
tests_regression/regression_datasets/connect_points.py:47
↓ 1 callersMethodembed_into_ga
Embeds raw inputs into the geometric algebra (+ scalar) representation. To be implemented by subclasses. Parameters --------
gatr/experiments/base_wrapper.py:85
↓ 1 callersMethodevaluate
Evaluates self.model on all eval datasets and logs the results.
gatr/experiments/base_experiment.py:276
↓ 1 callersFunctionextract_3d_object
Extracts 3D position and quaternion orientation from the multivector embedding of an object. This function inverts embed_3d_object(). The ex
gatr/interface/object.py:79
↓ 1 callersFunctionextract_3d_object_two_vec
Extracts 3D position and two-vec orientation from the multivector embedding of an object. This inverts embed_3d_object_two_vec(). Parameters
gatr/interface/object.py:187
↓ 1 callersMethodextract_from_ga
Embeds raw inputs into the geometric algebra (+ scalar) representation. To be implemented by subclasses. Parameters --------
tests_regression/regression_datasets/connect_points.py:81
↓ 1 callersMethodextract_from_ga
Extracts raw outputs from the GATr multivector + scalar outputs. To be implemented by subclasses. Parameters ----------
gatr/experiments/base_wrapper.py:104
↓ 1 callersMethodextract_from_ga
Extracts predicted positions from PGA multivectors.
gatr/experiments/nbody/wrappers.py:450
↓ 1 callersFunctionextract_pluecker_ray
Extract ray in Plücker coordinates from a multivector. Plücker coords are (v, o x v) for ray through o in direction v. Args: multive
gatr/interface/ray.py:28
↓ 1 callersFunctionextract_reflection
Extracts the normal on an reflection plane from a multivector. References ---------- Leo Dorst, "A Guided Tour to the Plane-Based Geometr
gatr/interface/reflection.py:37
↓ 1 callersFunctionextract_translation
DEPRECATED: Given a multivector, extract 3D translation vector from the bivector components. Note bene: this function is NOT equivariant, unless
gatr/interface/translation.py:52
↓ 1 callersFunctionflatten_dict
Flattens a nested dictionary with str keys.
gatr/utils/misc.py:63
↓ 1 callersFunctiongated_gelu
Pin-equivariant gated GeLU nonlinearity without division. Given multivector input x and scalar input gates (with matching batch dimensions), comp
gatr/primitives/nonlinearities.py:58
↓ 1 callersFunctiongated_gelu_divide
Pin-equivariant gated GeLU nonlinearity with division. Given multivector input x and scalar input gates (with matching batch dimensions), compute
gatr/primitives/nonlinearities.py:86
↓ 1 callersFunctiongatr_einsum_with_path
Computes einsum with a given contraction path (which is ignored when using compilation). Cf. `enable_cached_einsum` for more context.
gatr/utils/einsum.py:82
↓ 1 callersFunctiongenerate_datasets
Generates a canonical set of datasets for the n-body problem, stores them in `path`.
scripts/generate_nbody_dataset.py:29
↓ 1 callersFunctionget_batchsize
Given either a tensor or a list of tensors or a dict of tensors, returns the batchsize.
gatr/utils/misc.py:138
↓ 1 callersFunctionget_packages
Gets list of all Python packages to install.
docker/ext_packages/install_upstream_python_packages.py:232
↓ 1 callersFunctionget_parity
Gets parity of a clifford multivector. Given a clifford multivector, returns True if it is pure-odd-grade, False if it is pure-even grade, an
gatr/utils/clifford.py:72
↓ 1 callersFunctionget_version
Extracts version information. Inspired by item "1." @ https://packaging.python.org/guides/single-sourcing-package-version/.
setup.py:26
↓ 1 callersMethodinstall_package
Performs all steps necessary up to and including installation of the package.
docker/ext_packages/install_upstream_python_packages.py:75
↓ 1 callersFunctioninstall_packages
Refactors flat Python projects into installable form.
docker/ext_packages/install_upstream_python_packages.py:224
↓ 1 callersFunctionlinear
EquiLinear fixture for testing
tests/gatr/layers/test_gatr_block.py:31
↓ 1 callersMethodload_model
Loads a model checkpoint from disk. Parameters ---------- checkpoint : None or str or pathlib.Path Path to checkp
gatr/experiments/base_experiment.py:139
↓ 1 callersFunctionmain
Entry point for artery experiment.
scripts/artery_experiment.py:11
↓ 1 callersFunctionmain
Entry point for n-body experiment.
scripts/nbody_experiment.py:11
↓ 1 callersFunctionmain
Entry point for n-body dataset generation.
scripts/generate_nbody_dataset.py:51
↓ 1 callersMethodmake_edge_index
Constructs an edge index for fully connected graph.
gatr/experiments/nbody/wrappers.py:464
↓ 1 callersFunctionmake_full_edge_index
Creates a PyG-style edge index for a fully connected graph of `num_nodes` nodes.
gatr/utils/misc.py:115
↓ 1 callersFunctionminimum_dtype
Return dtype with maximum precision. Compatible with compilation.
gatr/utils/misc.py:162
↓ 1 callersMethodmove_to_project_folder
Moves Python files and folders into folder with the project's name, adapts imports.
docker/ext_packages/install_upstream_python_packages.py:133
↓ 1 callersMethodmove_to_src_folder
Moves package code to `src` folder. That is, we move the code from `<checkout_base_dir> / project-name / project-name` to `<checkout
docker/ext_packages/install_upstream_python_packages.py:179
↓ 1 callersMethodpip_install_refactored_package
Installs the refactored package using `pip`.
docker/ext_packages/install_upstream_python_packages.py:191
↓ 1 callersMethodremove_packaging_files
Removes all packaging files.
docker/ext_packages/install_upstream_python_packages.py:122
↓ 1 callersMethodreset_parameters
Initializes the weights of the layer. Parameters ---------- initialization : {"default", "small", "unit_scalar", "almost_unit
gatr/layers/linear.py:177
↓ 1 callersFunctionresursively_move_gcan_pga
Moves all PGA instances in GCAN component to device / dtype.
gatr/experiments/nbody/wrappers.py:479
↓ 1 callersMethodsample
Samples from gravity problem. Parameters ---------- num_samples : int Number of samples. num_planets : in
gatr/experiments/nbody/simulator.py:76
↓ 1 callersFunctionsample_pin_multivector
Samples from the Pin(3,0,1) group as a product of reflections.
gatr/utils/clifford.py:42
← previousnext →101–200 of 452, ranked by callers