Comments (2)
I'll take a look. Thanks for the minimal repro!
from jax.
I think this is a case of inconsistent dtypes.. the following works where everything is a float (instead of a combination of float and int).
In [4]: import jax
...:
...: def f(ix, t):
...: return ix, ix[1] + t
...:
...: def scan_f(x):
...: ix = jax.device_put((0., x))
...: _, xs = jax.lax.scan(f, ix, jax.numpy.arange(10, dtype=np.float32))
...: return xs.sum()
...:
...: jax.grad(scan_f)(1.)
Out[4]: Array(10., dtype=float32, weak_type=True)
The error message still sucks though. I'll look into improving it.
from jax.
Related Issues (20)
- jax.xla_computation as_hlo_text() HOT 2
- Add support for boolean mask indices inside jit HOT 5
- No visible GPU HOT 4
- reshape operation with Pallas on TPU/Mosaic cause XlaRuntimeError: INTERNAL HOT 2
- `lax.cond` sometimes inserts a nonlinear `lax.stop_gradient` into its JVP rule. HOT 1
- jnp.zeros((9500000,3), dtype=jnp.float32) lowers into slow broadcast. HOT 6
- jaxlib wheel hardcoded to manylinux2014 platform HOT 3
- shard_map should support static_argnums HOT 4
- Command to build jaxlib? HOT 1
- tree_util register_X functions remove type hints on decorated classes HOT 3
- Ergonomics: Move calls to partial inside decorators HOT 1
- jaxlib or libtpu not detected on TPU Pod HOT 9
- PositionalSharding for scalars fails HOT 2
- `Jax_numpy_rank_promotion` error setting not raising error HOT 4
- Array dispatching with __array_ufunc__ in JAX HOT 8
- Different roundings on GPU vs. CPU HOT 2
- Figure out + document how to use manual capture profiling with Kubernetes
- Is there difference in computing gradient between jax and torch HOT 1
- int4 reshape: Reshape should have supported layout before reaching the emitter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jax.