Hi Jon,
Thank you for creating these courses. I'm currently doing the first one, Linear Algebra for Machine Learning.
In 3.4 The Dot Product, you said the following:
-
(...) a lot of the PyTorch operations (...) don't work on integer-typed PyTorch tensors.
I've found this open issue in PyTorch issue where they mention that torch.dot can be calculated with tensors of integer type on a CPU, but not on a GPU. The issue is that you can't use integers to calculate gradients, like you said.
I'd like to propose adding a comment here to put this information into context:
|
"torch.dot(torch.tensor([25, 2, 5.]), torch.tensor([0, 1, 2.]))" |
-
(...) in TensorFlow, as far as am aware, there's a not a built-in dot product method.
I've searched and found the tf.tensordot function. It can be calculated as:
tf.tensordot(x_tf, y_tf, axes=1)
Similarly, I'd like to propose adding the command below the existing one with a comment:
|
"tf.reduce_sum(tf.multiply(x_tf, y_tf))" |
Hi Jon,
Thank you for creating these courses. I'm currently doing the first one, Linear Algebra for Machine Learning.
In 3.4 The Dot Product, you said the following:
(...) a lot of the PyTorch operations (...) don't work on integer-typed PyTorch tensors.
I've found this open issue in PyTorch issue where they mention that
torch.dotcan be calculated with tensors of integer type on a CPU, but not on a GPU. The issue is that you can't use integers to calculate gradients, like you said.I'd like to propose adding a comment here to put this information into context:
ML-foundations/notebooks/1-intro-to-linear-algebra.ipynb
Line 3212 in f6e244f
(...) in TensorFlow, as far as am aware, there's a not a built-in dot product method.
I've searched and found the
tf.tensordotfunction. It can be calculated as:Similarly, I'd like to propose adding the command below the existing one with a comment:
ML-foundations/notebooks/1-intro-to-linear-algebra.ipynb
Line 3291 in f6e244f