-
|
I'm trying to implement a simplified version of tf.linalg.diag. Basically, the input is an n-dimensional tensor with shape
Of course, everything is written in terms of dynamic/IxDyn dimensions. I'm a loss about what to do. Is there an "idiomatic" approach to solve this kind of problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I don't know if I understood correctly what it does, but can you check if this works? It probably lacks a lot of checks but the basic stuff is there I think. I also didn't manage to use |
Beta Was this translation helpful? Give feedback.
I don't know if I understood correctly what it does, but can you check if this works? It probably lacks a lot of checks but the basic stuff is there I think. I also didn't manage to use
exact_chunkswithZipand had to usezipinstead... It looks like it doesn't work ifmatrixanddiagdon't have the same shape.