Tensor/Matrix and math operations + reduction
See original GitHub issueTo get help from the community, check out our Google group.
TensorFlow.js version
0.13.2
Describe the problem or feature request
I’d like to request a feature reduce
that cumulatively applies the math function onto each item in the Tensor and produce a new tensor with a new shape.
Such API might be invoked like
tf.tensor2d([[1, 2], [3, 4]]).add.reduce(0)
// column wise reduction
// Result: [4, 6]<tensor>
tf.tensor2d([[1, 2], [3, 4]]).add.reduce(1)
// Row wise reduction
// Result: [3, 7]<tensor>
This feature request is heavily influenced by https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.ufunc.reduce.html
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Reduced Matrix Elements of Tensor Operators - AIP Publishing
Reduced matrix elements of a tensorial product of n tensor operators in the basis of N‐particle angular‐momentum eigenstates are expanded into a sum...
Read more >MATRICES AND TENSORS - Springer Link
Matrices are reviewed briefly, and determinants, vectors, and tensors of order two are described. The application of this linear algebra to material that ......
Read more >Matrix and Tensor Operations
This tutorial reviews the functions that Mathematica provides for building and working with matrices, vectors, and tensors. It focuses on functions that are ......
Read more >Tensor Reduction — Topic 13 of Machine Learning Foundations
... we'll perform hands-on code demos in NumPy, TensorFlow, and PyTorch in order to learn about reduction, a common tensor operation in ML....
Read more >Reduce the number of operations on a simple expression
I don't know whether there are good algorithms for computing ranks of higher tensors the way there are for matrices. Share.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, yes it does look like
prod
reduction op was recently added. Seems like this issue can be closed now!/cc @dsmilkov
@JasonShin This should work:
You can read more about reduce operations here