Skip to content
Snippets Groups Projects
Commit 42c125ed authored by Pat Alt's avatar Pat Alt
Browse files

uh

parent c02dd172
No related branches found
No related tags found
1 merge request!7669 initial run including fmnist lenet and new method
......@@ -48,6 +48,7 @@ We use the following identifiers:
- `moons` (*Moons* data)
- `circles` (*Circles* data)
- `mnist` (*MNIST* data)
- `fmnist` (*Fashion MNIST* data)
- `gmsc` (*GMSC* data)
To run experiments for multiple datasets at once simply separate them with a comma `,`
......
# Training data:
n_obs = 10000
counterfactual_data = load_fashion_mnist(n_obs)
counterfactual_data.X = ECCCo.pre_process.(counterfactual_data.X)
# VAE (trained on full dataset):
using CounterfactualExplanations.Models: load_fashion_mnist_vae
vae = load_fashion_mnist_vae()
counterfactual_data.generative_model = vae
# Test data:
test_data = load_fashion_mnist_test()
# Additional models:
add_models = Dict(
"LeNet-5" => lenet5,
)
# Default builder:
n_hidden = 128
activation = Flux.swish
builder = MLJFlux.@builder Flux.Chain(
Dense(n_in, n_hidden, activation),
Dense(n_hidden, n_out),
)
# Run:
run_experiment(
counterfactual_data, test_data;
dataname="Fashion-MNIST",
builder= builder,
𝒟x = Uniform(-1.0, 1.0),
α = [1.0,1.0,1e-2],
sampling_batch_size = 10,
sampling_steps=50,
use_ensembling = true,
n_individuals = 5,
nsamples = 10,
nmin = 10,
use_variants = false,
use_class_loss = true,
additional_models=add_models,
epochs = 10,
)
\ No newline at end of file
......@@ -11,4 +11,4 @@
module load 2023r1 openmpi julia
srun julia --project=experiments experiments/run_experiments.jl -- data=linearly_separable threaded
srun julia --project=experiments experiments/run_experiments.jl -- data=linearly_separable threaded > experiments/hpc.log
......@@ -38,6 +38,11 @@ if "mnist" in datanames
include("mnist.jl")
end
if "fmnist" in datanames
@info "Running Fashion-MNIST experiment."
include("fmnist.jl")
end
if USE_MPI
MPI.Finalize()
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment