Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a readme #130

Merged
merged 2 commits into from
Aug 22, 2022
Merged

Add a readme #130

merged 2 commits into from
Aug 22, 2022

Conversation

mcabbott
Copy link
Member

No description provided.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Co-authored-by: Brian Chen <[email protected]>
Copy link
Member

@ToucheSir ToucheSir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me overall, though others may have thoughts.

@FluxML FluxML deleted a comment from codecov-commenter Aug 22, 2022
@FluxML FluxML deleted a comment from coveralls Aug 22, 2022
@mcabbott
Copy link
Member Author

Maybe it ought to have a "limitations" section? Mentioning that array mutation is unsupported... and that the more your model looks like a simple Flux model the better hope you have? Not sure.

@ToucheSir
Copy link
Member

I was under the impression that limited mutation was supported as it is in PyTorch, is that not the case? Either way, IMO a limitations section seems more useful iff. we can come up with some concrete examples of said limitations.

@mcabbott
Copy link
Member Author

mcabbott commented Aug 22, 2022

Oh I messed up my example. Some do work, via TrackedReal, some don't:

julia> Tracker.gradient([1,2,3]) do x
         y = ones(eltype(x), 2)
         y[1] = x[end]^2
         sum(y)
       end
([0.0, 0.0, 6.0] (tracked),)

julia> Tracker.gradient([1,2,3]) do x  # works under ReverseDiff
         y = fill!(similar(x), 0)
         y[1] = x[end]^2
         sum(y)
       end
ERROR: MethodError: no method matching Float64(::Tracker.TrackedReal{Float64})

 [2] setindex!(A::Vector{Float64}, x::Tracker.TrackedReal{Float64}, i1::Int64)
   @ Base ./array.jl:957

julia> Tracker.gradient([1,2,3]) do x  # fails with ReverseDiff too
         x[1] = x[3]^3
         sum(x)
       end
ERROR: Can't differentiate `setindex!`

@mcabbott
Copy link
Member Author

We can adjust later, maybe this is a start at least...

@mcabbott mcabbott merged commit 187b472 into FluxML:master Aug 22, 2022
@mcabbott mcabbott deleted the readme branch August 22, 2022 15:34
@coveralls
Copy link

coveralls commented Nov 5, 2024

Pull Request Test Coverage Report for Build 2900404559

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 72.141%

Totals Coverage Status
Change from base Build 2900392751: 0.0%
Covered Lines: 492
Relevant Lines: 682

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants