Skip to content

Commit

Permalink
backAD wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fsxbhyy committed Sep 23, 2023
1 parent b6232fe commit 7047e66
Show file tree
Hide file tree
Showing 4 changed files with 272 additions and 107 deletions.
4 changes: 4 additions & 0 deletions src/computational_graph/eval.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ end
function eval!(g::Number)
return g
end

function eval!(nothing)
return nothing
end
4 changes: 2 additions & 2 deletions src/computational_graph/graph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ function Base.:*(g1::Graph{F,W}, g2::Graph{F,W}) where {F,W}
# Currently Prod of two green's function ignore topology
if g1.operator == Prod && onechild(g1)
g1_sub = g1.subgraphs[1]
subfactor1 = g1.subgraph_factors[1] * g1.factor
subfactor1 = g1.subgraph_factors[1] #* g1.factor
else
g1_sub = g1
subfactor1 = F(1.0)
end

if g2.operator == Prod && onechild(g2)
g2_sub = g2.subgraphs[1]
subfactor2 = g2.subgraph_factors[1] * g2.factor
subfactor2 = g2.subgraph_factors[1] # * g2.factor
else
g2_sub = g2
subfactor2 = F(1.0)
Expand Down
Loading

0 comments on commit 7047e66

Please sign in to comment.