Skip to content

Commit

Permalink
Merge 901526a into 4a77b5b
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Apr 22, 2019
2 parents 4a77b5b + 901526a commit 4911726
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/ChainRules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ using Base.Broadcast: materialize, materialize!, broadcasted, Broadcasted, broad

import NaNMath, SpecialFunctions, LinearAlgebra, LinearAlgebra.BLAS

export AbstractRule, Rule, frule, rrule

include("differentials.jl")
include("rules.jl")
include("rules/base.jl")
Expand Down
8 changes: 4 additions & 4 deletions src/rules.jl
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ unary input, unary output scalar function:
```julia-repl
julia> x = rand();
julia> sinx, dsin = ChainRules.frule(sin, x);
julia> sinx, dsin = frule(sin, x);
julia> sinx == sin(x)
true
Expand All @@ -258,7 +258,7 @@ unary input, binary output scalar function:
```julia-repl
julia> x = rand();
julia> sincosx, (dsin, dcos) = ChainRules.frule(sincos, x);
julia> sincosx, (dsin, dcos) = frule(sincos, x);
julia> sincosx == sincos(x)
true
Expand Down Expand Up @@ -300,7 +300,7 @@ unary input, unary output scalar function:
```julia-repl
julia> x = rand();
julia> sinx, dx = ChainRules.rrule(sin, x);
julia> sinx, dx = rrule(sin, x);
julia> sinx == sin(x)
true
Expand All @@ -314,7 +314,7 @@ binary input, unary output scalar function:
```julia-repl
julia> x, y = rand(2);
julia> hypotxy, (dx, dy) = ChainRules.rrule(hypot, x, y);
julia> hypotxy, (dx, dy) = rrule(hypot, x, y);
julia> hypotxy == hypot(x, y)
true
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# TODO: more tests!

using ChainRules, Test, FDM, LinearAlgebra, Random
using ChainRules: rrule, frule, extern, accumulate, accumulate!, store!, @scalar_rule,
using ChainRules: extern, accumulate, accumulate!, store!, @scalar_rule,
Wirtinger, wirtinger_primal, wirtinger_conjugate, add_wirtinger, mul_wirtinger,
Zero, add_zero, mul_zero, One, add_one, mul_one, Casted, cast, add_casted, mul_casted,
DNE, Thunk, Casted, Wirtinger
DNE, Thunk, Casted
using Base.Broadcast: broadcastable

include("test_util.jl")
Expand Down

0 comments on commit 4911726

Please sign in to comment.