Skip to content

Commit

Permalink
fix CI and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
CheukHinHoJerry committed Sep 29, 2023
1 parent 6c56778 commit 7f53212
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 600 deletions.
6 changes: 4 additions & 2 deletions src/backflowpooling.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using ACEpsi.AtomicOrbitals: AtomicOrbitalsBasisLayer
using LuxCore: AbstractExplicitLayer
using Random: AbstractRNG
using ChainRulesCore
using ChainRulesCore: NoTangent

using Polynomials4ML: _make_reqfields, @reqfields, POOL, TMP, META
using ObjectPools: acquire!

import ChainRulesCore: rrule

mutable struct BackflowPooling
basis::AtomicOrbitalsBasisLayer
@reqfields
Expand Down Expand Up @@ -86,7 +88,7 @@ function evaluate(pooling::BackflowPooling, ϕnlm::AbstractArray, Σ::AbstractVe
end

# --------------------- connect with ChainRule
function ChainRulesCore.rrule(::typeof(evaluate), pooling::BackflowPooling, ϕnlm, Σ::AbstractVector)
function rrule(::typeof(evaluate), pooling::BackflowPooling, ϕnlm, Σ::AbstractVector)
A = pooling(ϕnlm, Σ)
function pb(∂A)
return NoTangent(), NoTangent(), _pullback_evaluate(∂A, pooling, ϕnlm, Σ), NoTangent()
Expand Down
Loading

0 comments on commit 7f53212

Please sign in to comment.