gathierry/FastFlow

Error in local implementation

Closed this issue · 4 comments

sehau commented

Excuse me, I got an error when reproducing locally. When training with bottle, the error description is "ValueError: Only one class present in y_true. ROC AUC score is not defined in that case." When training with capsule, the error description is "ValueError: Predictions should be of shape (batch_size, n_classes) or (batch_size, )."

Is my dataset configuration wrong?

Did you modify the code?
Did you try categories other than the two you mentioned?
And if possible, could you paste the full traceback message?

sehau commented

Sorry, maybe I modified the code to get an error.

After I re-run it, there is no error, only in some categories there will be a running warning with only one type of label.
E.g/data/anaconda3/envs/pytorch/lib/python3.6/site-packages/ignite/metrics/epoch_metric.py:76: RuntimeWarning: Probably, there can be a problem with "compute_fn": Only one class present in y_true. ROC AUC score is not defined in that case.. RuntimeWarning)

It's fine now, but there's a bug in the example that I need to point out.

In # train python main.py --cfg configs/resnet18.yaml --data path/to/mvtec-ad -cat [category], --cfg should be -cfg.

Thanks for your answer and have a nice day.

sehau commented

Did you modify the code? Did you try categories other than the two you mentioned? And if possible, could you paste the full traceback message?

By the way, inpython main.py --cfg configs/resnet18.yaml --data path/to/mvtec-ad -cat [category] --eval -ckpt _fastflow_experiment_checkpoints/exp[index]/[epoch#].pt, should ‘--cfgbe-cfg`?

Yes, it is a typo in readme. It should be -cfg or --config thanks for pointing that out. I already update the readme file