Skip to content

Commit

Permalink
test paramfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Mar 5, 2024
1 parent 6b45d04 commit ed6079c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_reconstruct_points.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enc_nfilter_internal = [25,50,75]
skipconnections = start_skip:(length(enc_nfilter_internal)+1)

fnames_rec = ["data-avg.nc"]
paramfile = tempname()

Random.seed!(seed)
Atype =
Expand Down Expand Up @@ -80,6 +81,7 @@ DINCAE.reconstruct_points(
regularization_L1_beta = regularization_L1_beta,
regularization_L2_beta = regularization_L2_beta,
loss_weights_refine = loss_weights_refine,
paramfile = paramfile,
)


Expand All @@ -92,6 +94,11 @@ NCDataset(fnames_rec[1]) do ds
@test size(ds[varname],2) == length(latr)
end

@test isfile(paramfile)

NCDataset(paramfile) do ds
@test ds.attrib["epochs"] == epochs
end


@test_throws Exception DINCAE.reconstruct_points(
Expand Down

0 comments on commit ed6079c

Please sign in to comment.