tensorly / tensorly

TensorLy: Tensor Learning in Python.
http://tensorly.org
Other
1.51k stars 281 forks source link

Simplify proximal operator code #534

Closed aarmey closed 4 months ago

aarmey commented 7 months ago

Indexing operations are slow on the Jax and Tensorflow backends. This aims to reduce the places where indexing occurs. It should also make it possible to use the Tensorflow backend.

codecov[bot] commented 7 months ago

Codecov Report

Merging #534 (dc1b677) into main (357aa66) will increase coverage by 0.13%. Report is 2 commits behind head on main. The diff coverage is 42.85%.

@@            Coverage Diff             @@
##             main     #534      +/-   ##
==========================================
+ Coverage   87.06%   87.20%   +0.13%     
==========================================
  Files         121      121              
  Lines        7703     7684      -19     
==========================================
- Hits         6707     6701       -6     
+ Misses        996      983      -13     
Files Coverage Δ
tensorly/tenalg/proximal.py 69.38% <42.85%> (+1.69%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

JeanKossaifi commented 7 months ago

@aarmey I love it! This is so much cleaner!! Maybe we can just add a comment for someone reading that code later.