Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard2926 committed Apr 15, 2024
1 parent 7b72795 commit acbc932
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/models/DFNO_3D/forward.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ function forward(model::Model, θ, x::Any)
x2 = (model.convs[i](θ) * x) + model.sconv_biases[i](θ)

x = vec(x1) + vec(x2)
x = reshape(x, (model.config.nc_lift, :))
x = reshape(x, (model.config.nc_lift, model.config.nt * model.config.nx ÷ model.config.partition[1], model.config.ny * model.config.nz ÷ model.config.partition[2], :))
# x = reshape(x, (model.config.nc_lift, :))

N = ndims(x)
ϵ = 1f-5
Expand Down Expand Up @@ -72,6 +73,7 @@ function forward(model::Model, θ, x::Any)
x = relu.(x)
end
end
x = reshape(x, (model.config.nc_lift, :))

x = (model.projects[1](θ) * x) + model.biases[2](θ)
x = relu.(x)
Expand Down

0 comments on commit acbc932

Please sign in to comment.