AdneneBoumessouer / MVTec-Anomaly-Detection

This project proposes an end-to-end framework for semi-supervised Anomaly Detection and Segmentation in images based on Deep Learning.
278 stars 59 forks source link

'self.lr_mult = (end_lr / start_lr) ** (1 / num_batches) ZeroDivisionError: division by zero' #59

Closed KouateMuhamed closed 3 years ago

KouateMuhamed commented 3 years ago

Hi, I have this problem and I'd like to know how to fix it, please.

Traceback (most recent call last): File "train.py", line 238, in <module> main(args) File "train.py", line 81, in main autoencoder.find_lr_opt(train_generator, validation_generator) File "/home/tom/projects/lucas/textile/MVTec/MVTec-Anomaly-Detection/autoencoder/autoencoder.py", line 191, in find_lr_opt restore_weights_only=True, File "/root/anaconda3/envs/mvtec/lib/python3.6/site-packages/ktrain/core.py", line 553, in lr_find verbose=verbose) File "/root/anaconda3/envs/mvtec/lib/python3.6/site-packages/ktrain/lroptimize/lrfinder.py", line 94, in find self.lr_mult = (end_lr / start_lr) ** (1 / num_batches) ZeroDivisionError: division by zero

AdneneBoumessouer commented 3 years ago

Please avoid just copying and pasting error messages without giving any context on how to the error has been produced.

KouateMuhamed commented 3 years ago

Please avoid just copying and pasting error messages without giving any context on how to the error has been produced.

I apologize for the lack of details.

I downloaded the MVTec dataset and am trying to launch the training using carpet images. However, when I try to run the train.py script, it returns me the reported error.

python3 train.py -d mvtec/carpet/ -a mvtecCAE -b 2 -l ssim -c grayscale