c0dearm / mushin

Computational graphs with reverse automatic differentation in the GPU
Other
387 stars 9 forks source link

change!: variable and constant tensors are now different types #6

Closed c0dearm closed 2 years ago

c0dearm commented 2 years ago

Constant and variable tensors are now different types, which means, after getting lost on many computations the developer can know which of the resulting tensors are still constants or variables. Another benefit from this is that code is clearer now, as we don't need to assert at runtime if a tensor is a constant, for example when deciding if computing a gradient or not.

Aside from this, I've also spent 10 minutes designing a logo for the library, given I have 0 skill for this I am quite happy with the result!

codecov-commenter commented 2 years ago

Codecov Report

Merging #6 (df8c10e) into main (bfd77ab) will decrease coverage by 2.28%. The diff coverage is 69.66%.

@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   74.12%   71.83%   -2.29%     
==========================================
  Files           7        7              
  Lines         286      245      -41     
==========================================
- Hits          212      176      -36     
+ Misses         74       69       -5     
Impacted Files Coverage Δ
src/context/storage.rs 25.00% <14.28%> (+15.00%) :arrow_up:
src/gradient.rs 29.41% <28.00%> (-48.37%) :arrow_down:
src/context/function.rs 50.00% <50.00%> (+3.70%) :arrow_up:
src/context/mod.rs 50.00% <60.00%> (-1.62%) :arrow_down:
src/tensor.rs 60.46% <60.46%> (-12.87%) :arrow_down:
src/context/tape.rs 88.88% <93.33%> (+7.07%) :arrow_up:
src/ops.rs 99.09% <98.87%> (-0.91%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bfd77ab...df8c10e. Read the comment docs.