Reproduction of MorphoMNIST results
Closed this issue · 4 comments
Hello again,
Where could I find the code that reproduces your results on MorphoMNIST?
Thanks!
Hi,
I added an example here:
https://github.com/biomedia-mira/causal-gen/blob/main/notebooks/eval_example.ipynb
Hope it helps!
Fabio
Many many thanks!
Hello,
I tried to run the code for the evaluation on MorphoMnist, but it doesn't work properly.
In the notebook you are calling cf_epoch(vae, pgm, predictor, dataloaders, do_pa=do_pa, te_cf=te_cf, rand_sample=rand_sample)
, but in the train_cf.py
this function gets a little bit different arguments (def cf_epoch( args: Hparams, model: nn.Module, ema: nn.Module, dataloaders: Dict[str, DataLoader], elbo_fn: TraceStorage_ELBO, optimizers: Optional[Tuple] = None, split: str = "train", ):
and also seems to return different results than (preds, targets, x_cfs)
. Moreover the function get_metrics
that the cf_epoch
calls it's not implemented for the case of morphomnist.
Hi!
The eval example is mostly indicative, I've updated it to make it easier to build upon:
https://github.com/biomedia-mira/causal-gen/blob/main/notebooks/eval_example.ipynb
Best,
Fabio