Ignite Ensemble training/evaluator for classification #507
Replies: 3 comments 1 reply
-
Hi @davidiommi , Thanks for your interest here. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. This is the chunk of code for training. I have two classes (0,1) for a dataset of 3D images. It is able to compute the loss function, but I have "INFO:ignite.engine.engine.SupervisedTrainer:Key metric: None best value: -1 at epoch: -1" When computing the metric. I am confused on what to write on the val_handlers and postprocessing to run correctly the code. I use the last stable version of Monai.
|
Beta Was this translation helpful? Give feedback.
-
Perhaps for your validation post transforms you shouldn't have y_onehot = [y_trans(i) for i in decollate_batch(y)]
y_pred_act = [y_pred_trans(i) for i in decollate_batch(y_pred)]
auc_metric(y_pred_act, y_onehot)
result = auc_metric.aggregate()
auc_metric.reset() |
Beta Was this translation helpful? Give feedback.
-
Hello!
I saw your tutorial on ensemble training/evaluation for segmentation. I wanted to apply your cross-validation and ensemble training for classification on 3D images, but I get error messages during the validation handler. My problem is that I have to apply these two transforms from the "https://github.com/Project-MONAI/tutorials/blob/master/3d_classification/ignite/densenet_training_dict.py"
post_label = Compose([EnsureType(), AsDiscrete(to_onehot=2)])
post_pred = Compose([EnsureType(), Activations(softmax=True)])
in the SupervisedTrainer, SupervisedEvaluator, and val_post_transforms (from the tutorial https://github.com/Project-MONAI/tutorials/blob/master/modules/cross_validation_models_ensemble.ipynb)
could you please show how you could modify the SupervisedTrainer and SupervisedEvaluator and val_post_transforms in case of classification and not segmentation?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions