mrdbourke / tensorflow-deep-learning

All course materials for the Zero to Mastery Deep Learning with TensorFlow course.
https://dbourke.link/ZTMTFcourse
MIT License
5.05k stars 2.5k forks source link

Misleading statement about matrix multiplication and dot product #563

Open 0xdbff opened 1 year ago

0xdbff commented 1 year ago

I've noticed a potentially misleading statement in notebook 00. The statement is: "Multiplying matrices by each other is also referred to as the dot product."

While it's true that matrix multiplication involves calculating a series of dot products, the two operations are not the same. The dot product is an operation between two vectors that results in a scalar, while matrix multiplication is an operation between two matrices that results in another matrix. In the context of TensorFlow, tf.matmul() performs matrix multiplication, and tf.tensordot() can perform a similar operation when the axes parameter is set to 1 https://www.tensorflow.org/api_docs/python/tf/tensordot . However, these are distinct operations and should not be conflated.

I believe this statement could lead to confusion, especially for those new to these concepts. I suggest it be revised for clarity. Using tf.tensordot() for matrix multiplication can be valid in certain contexts, but the key point here is the misleading conclusion drawn from the statement.

Debkumar49 commented 1 year ago

https://mkang32.github.io/python/2020/08/23/dot-product.html#:~:text=Matrix%20multiplication%20is%20basically%20a,of%20vectors%20in%20each%20matrix.

check out this one

JaynouOliver commented 1 year ago

thanks, just went through that video 1 day ago