Skip to content

Commit

Permalink
Minor typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglw0521 committed Oct 21, 2023
1 parent eca0761 commit 479a65c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ConstLinearLayer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end

(l::ConstLinearLayer)(x::AbstractArray,ps,st) = (l(x), st)

# NOTE: the following rrule is kept because there is a issue with SparseArray
# NOTE: the following rrule is kept because there is an issue with SparseArray
function rrule(::typeof(LuxCore.apply), l::ConstLinearLayer, x::AbstractVector)
val = l(x)
function pb(A)
Expand Down
3 changes: 1 addition & 2 deletions src/radial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ function simple_radial_basis(basis::ScalarPoly4MLBasis,f_cut::Function=r->1,f_tr
end
end


_norm(x) = try norm(x); catch; norm(x.rr); end
_norm(x) = norm(x.rr)
return Radial_basis(Chain(trans = WrappedFunction(x -> f_trans.(_norm.(x))), evaluation = Lux.BranchLayer(poly = lux(basis), cutoff = WrappedFunction(x -> f_cut.(x))), env = WrappedFunction(x -> x[1].*x[2]), ), spec)

end

0 comments on commit 479a65c

Please sign in to comment.