Gradient of the difference norm between a CP and dense tensor#294
Conversation
Codecov Report
@@ Coverage Diff @@
## main #294 +/- ##
==========================================
- Coverage 89.33% 89.24% -0.10%
==========================================
Files 91 91
Lines 4857 4881 +24
==========================================
+ Hits 4339 4356 +17
- Misses 518 525 +7
Continue to review full report at Codecov.
|
yngvem
left a comment
There was a problem hiding this comment.
Nice addition! I just have one note — with this implementation, we can compute the loss essentially for free (0.5*tl.sum(error**2)), and you are often interested in getting both the loss and the gradient simultaneously (e.g. in a line-search). Maybe we should add an optional keyword-argument return_loss that we can enable to compute the loss too?
|
Flott, takk @yngvem! Your suggestions should be incorporated here. I think I've also fixed the test for the lower accuracy backends. Those should pass now. |
A few notes: