Non-differentiable operations are left off the tape, so replays return stale values and gradients
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- julia
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Start in src/tracked.jl, where the issue says these operations on TrackedReals return untracked values, then read how forward_pass! replays recorded instructions. Use the provided floor(x[1]) * x[2] example to check GradientTape replay, compiled tape replay, and gradient! with a DiffResult. Done means the replayed value and gradient match fresh evaluation for the listed operations.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
floor, ceil, trunc, round (also with a type argument), fld, cld and div of TrackedReals return untracked values (src/tracked.jl), so nothing is recorded for them. forward_pass! only replays recorded instructions, so downstream instructions keep the value captured at recording time. A replayed GradientTape or compiled tape then returns a wrong gradient, and gradient! with a DiffResult also a wrong value:
using ReverseDiff, DiffResults
f(x) = floor(x[1]) * x[2]
tape = ReverseDiff.GradientTape(f, [1.5, 2.0])
x = [2.5, 2.0]
r = ReverseDiff.gradient!(DiffResults.GradientResult(x), tape, x)
DiffResults.value(r) # 2.0, but f(x) == 4.0
DiffResults.gradient(r) # [0.0, 1.0], but ReverseDiff.gradient(f, x) == [0.0, 2.0]
ReverseDiff.gradient!(ReverseDiff.compile(tape), x) # [0.0, 1.0]
This is not the documented limitation on value-dependent branching: there is no branch, the operation is just not recorded. Recording these operations (with zero derivatives) would let the forward pass recompute them while the reverse pass skips them.
#301 extends the same behaviour to broadcasts whose function returns no Dual (e.g. (t -> t > 0 ? 1.0 : -1.0).(x)), which master records.
- Ngôn ngữ chính
- Julia
- Star
- 397
- Fork
- 62
- Merge trung bình
- 8 giờ 9 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaDiff/ReverseDiff.jl
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
JuliaDiff/ReverseDiff.jl#318 ·
-
`@grad`/`@grad_from_chainrules` silently reuse a tangent if a pullback returns too few tangentsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
JuliaDiff/ReverseDiff.jl#315 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
JuliaDiff/ReverseDiff.jl#314 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 46/100
JuliaDiff/ReverseDiff.jl#327 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
JuliaDiff/ReverseDiff.jl#321 ·
Tất cả issue của JuliaDiff/ReverseDiff.jl
Issue tương tự
-
Prescribed ice velocities never get their halos filled, so ice is created at a periodic seamĐang mở🕷️ bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CliMA/ClimaSeaIce.jl#203 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
JuliaPhysics/BeamletOptics.jl#221 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
release preparation spack
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
30-minutes algorithm any-language codewars dart easy elixir hackerrank hacktoberfest haskell help wanted interview-prep julia leetcode lua open-source r scala students zig
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Huerte/algo-solutions-python#163 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
QuantumSavory/QuantumClifford.jl#853 ·
Maintainer thường phản hồi trong vòng 1 ngày