Description
The following comment is not correct:
|
def grad(self, inputs, gout): |
|
# a is sparse, b is dense, g_out is dense |
|
# ga = g_out x b.T |
|
# gb = a.T x g_out |
|
(a, b) = inputs |
|
(g_out,) = gout |
|
return [structured_dot_grad(a, b, g_out), structured_dot(a.T, g_out)] |
because b and g_out could be sparse, too.
However, they are not supported when performing the operation via C code, only via Python (and soon via numba as well).
Description
The following comment is not correct:
pytensor/pytensor/sparse/math.py
Lines 1396 to 1402 in 18fbf45
because
bandg_outcould be sparse, too.However, they are not supported when performing the operation via C code, only via Python (and soon via numba as well).