question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add generic dot product as a method.

See original GitHub issue

From @nsthorat on January 28, 2018 17:49

Right now we only have “matMul” which forces you to have 2 Array2Ds, so a vector * matrix becomes:

v.as2D(-1, m.shape[0]).matMul(m)

We should simply have to do v.dot(m).

Copied from original issue: tensorflow/tfjs-core#610

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jerryqhyucommented, Sep 10, 2018

Could you expand the implementation of dot to mirror that of tf.tensordot or even implement tf.einsum from tensorflow? Currently dot only support 1d and 2d tensors. There was tensorflow/tfjs-layers#305, but it is for the layers API and follows Theano convention, which is not as easy to use as tensorflow’s. Many thanks.

0reactions
dsmilkovcommented, May 31, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I create one generic dot product method for various ...
I would like to create same Func but for various number types (long, short, etc. and not only int). The code below does...
Read more >
Dot product - Rosetta Code
Task Create a function/use an in-built function, to compute the dot product, also known as the scalar product of two vectors.
Read more >
Generate dot product of two vectors - Simulink - MathWorks
The Dot Product block generates the dot product of the input vectors.
Read more >
Program for dot product and cross product of two vectors
There are two vector A and B and we have to find the dot product and cross product of two vector array. Dot...
Read more >
Dot Product In Many Programming Languages - C2 wiki
Assuming VisualBasicNine or greater, the most generic implementation looks like this: Function dotProduct(ByVal a As IEnumerable(Of Double), ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found