issues Search Results · repo:google/tree-math language:Python
Filter by
11 results
(69 ms)11 results
ingoogle/tree-math (press backspace or delete to remove)it would be nice to have some fields be pytree nodes and others not, which would make this a full replacement for
flax.struct
GallagherCommaJack
- 4
- Opened on Jul 5, 2023
- #21
import jax.numpy as jnp
import tree_math as tm
def f(x, y):
return x, y
x = y = tm.Vector(jnp.array(0.))
tm.unwrap(f, out_vectors = (True, False))(x, y)
# (tree_math.Vector(DeviceArray(0., dtype=float32, ...
deasmhumhna
- 1
- Opened on Nov 10, 2022
- #16
I m not sure if I m using this right, but here s what I have:
from tree_math import Vector
from typing import Any, Callable, TypeVar
from jax.scipy.optimize import minimize
T = TypeVar( T )
def tree_minimize(fun: ...
NeilGirdhar
- 2
- Opened on Oct 17, 2022
- #15
How should I go about importing struct? Thanks!
My attempt below fails --
import tree_math
@tree_math.struct
class Point:
x: float
y: float
AttributeError: module tree_math has no attribute ...
pharringtonp19
- 1
- Opened on Aug 10, 2022
- #14
Wondering how well tree-math supports computation on multiple devices?
Let s say we have a pytree of tensors of different dimensions and want to perform some operations on each of them with
tree-math, ...
connection-on-fiber-bundles
- 1
- Opened on Apr 21, 2022
- #10
It would be nice to have an easy way to define dataclasses that are also tree-math vectors.
We could borrow the syntax of flax.struct here: https://flax.readthedocs.io/en/latest/flax.struct.html
Example ...
shoyer
- 2
- Opened on Feb 15, 2022
- #9
It seems like the current implementation doesn t allow broadcasting arguments. Here s an example for normalizing leafs.
import tree_math as tm
import jax
import jax.numpy as jnp
a = jnp.ones(10)
b = ...
GeoffNN
- 5
- Opened on Jan 3, 2022
- #8
I d like to add a Matrix class to complement Vector.
A key design question is what this needs to support. In particular: do we need to support multiple axes that correspond
to flattened pytrees, or is ...
shoyer
- 11
- Opened on Dec 29, 2021
- #6
These are rather undescriptive names, and I guess most people (including myself!) will have to guess check to keep them
straight. :)
Some other possibilities, in rough order of increasing descriptiveness: ...
shoyer
- 2
- Opened on Dec 29, 2021
- #5

Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Press the /
key to activate the search input again and adjust your query.
Learn how you can use GitHub Issues to plan and track your work.
Save views for sprints, backlogs, teams, or releases. Rank, sort, and filter issues to suit the occasion. The possibilities are endless.Learn more about GitHub IssuesProTip!
Restrict your search to the title by using the in:title qualifier.