Comments (7)
the type.shape are not propagated properly
This is a nice have but not a must. PyTensor is only requires to propagate broadcastable info at write time.
In any case, the loss likely comes from the Reshape Op.
The complicated tensordot should probably be a rewrite, as I'm sure JAX has a nice support for it without reshape tricks. Numba I don't know.
Neither of these preclude just patching the current bug.
from pytensor.
the type.shape are not propagated properly
This is a nice have but not a must. PyTensor is only required to propagate broadcastable info at write time.
In any case, the loss likely comes from the Reshape Op.
The complicated tensordot should probably be a rewrite, as I'm sure JAX has a nice support for it without reshape tricks. Numba I don't know.
Neither of these preclude just patching the current bug.
from pytensor.
I found that I can mostly copy over the implementation from numpy. The only stuff that I had to do differently is handling broadcastable
, x.type.shape
and x.shape
properly to ensure everything runs smoothly.
The problem is that numpy
has no implementation for batched
, and to be honest, it seems to me like keeping batched
versions of dot
and tensordot
is completely pointless. @ricardoV94, what do you think?
from pytensor.
I don't recall exactly what batched was doing. It uses BatchedDot
to create a Batched TensorDot or something along those lines?
from pytensor.
It treats the first dimension of the tensors as batches. Mostly like a crude Blockwise
from pytensor.
It treats the first dimension of the tensors as batches. Mostly like a crude
Blockwise
If that is not being used anywhere in the codebase we can remove with perhaps an informative error message if anyone tries to call with the old signature. I think we can handle that better by trying to optimize Blockwise dots at compile time instead.
from pytensor.
Which dimension was assumed to be batched, the leading one? I see you mentioned it.
For backwards-compat you could also just use pt.vectorize
after doing the core tensordot (may or not need to change the input axis), and still start deprecating the kwarg (in this case legacy code wouldn't be broken immediately, just probably run slower)
Not sure it's worth it!
from pytensor.
Related Issues (20)
- BUG: `log10` gradient introduces `float64` HOT 1
- Implement matrix_transpose and mT method for TensorVariables HOT 2
- Drop support for Python 3.9
- Add `name` keyword argument to `Op.__call__` HOT 3
- Test on numpy 2.0 HOT 8
- Add type hints / documentation for `mode` argument HOT 1
- Add helper function to find all inputs needed to a compile a graph HOT 1
- DOC: Installation instructions in the developer start guide outdated HOT 1
- Move constants inside OpFromGraph and remove unused inputs/outputs
- `pt.specify_broadcastable` does not work with negative axis values HOT 2
- Add kwarg to call to return next rng from RandomVariables
- Get rid of dummy type input to RVs
- BUG: configdefaults invokes config.cxx even when config.cxx is absent
- Don't fail when squeezing specific non-broadcastable axis HOT 2
- Avoid dimshuffle if expand_dims has empty axis
- Add pre-commit hook to avoid print statements. HOT 2
- Include Op in message when raising NotImplementedError from grad HOT 5
- Upload codecov job is failing systematically
- Reconcile environment for development and docs building
- Handling tensor with variable length of dimension
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 pytensor.