Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

train end error. #55

Open
simplew2011 opened this issue Nov 17, 2020 · 2 comments
Open

train end error. #55

simplew2011 opened this issue Nov 17, 2020 · 2 comments

Comments

@simplew2011
Copy link

simplew2011 commented Nov 17, 2020

Found 223 images belonging to 1 classes.
Found 24 images belonging to 1 classes.
INFO:autoencoder.autoencoder:initiating learning rate finder to determine best learning rate.
simulating training for different learning rates... this may take a few moments...
Epoch 1/10
13/13 [==============================] - 152s 12s/step - loss: 0.6025 - mssim: 0.3975
Epoch 2/10
13/13 [==============================] - 152s 12s/step - loss: 0.5974 - mssim: 0.4026
Epoch 3/10
13/13 [==============================] - 156s 12s/step - loss: 0.5921 - mssim: 0.4079
Epoch 4/10
13/13 [==============================] - 155s 12s/step - loss: 0.5702 - mssim: 0.4298
Epoch 5/10
13/13 [==============================] - 156s 12s/step - loss: nan - mssim: nan
Epoch 6/10
13/13 [==============================] - 155s 12s/step - loss: nan - mssim: nan
Epoch 7/10
13/13 [==============================] - 148s 11s/step - loss: nan - mssim: nan
Epoch 8/10
13/13 [==============================] - 146s 11s/step - loss: nan - mssim: nan
Epoch 9/10
13/13 [==============================] - 144s 11s/step - loss: nan - mssim: nan
Epoch 10/10
13/13 [==============================] - 143s 11s/step - loss: nan - mssim: nan

done.
Visually inspect loss plot and select learning rate associated with falling loss
INFO:autoencoder.autoencoder:lr with minimum loss divided by 10: 8.09E-04
INFO:autoencoder.autoencoder:lr with minimum numerical gradient: 8.38E-05
C:\Users\Administrator\Desktop\MVTec-Anomaly-Detection-master\autoencoder\autoencoder.py:231: RuntimeWarning: invalid value encountered in less
self.lr_opt_i = np.argwhere(segment < optimal_loss)[0][0]
Traceback (most recent call last):
File "train.py", line 238, in
main(args)
File "train.py", line 81, in main
autoencoder.find_lr_opt(train_generator, validation_generator)
File "C:\Users\Administrator\Desktop\MVTec-Anomaly-Detection-master\autoencoder\autoencoder.py", line 194, in find_lr_opt
self.custom_lr_estimate()
File "C:\Users\Administrator\Desktop\MVTec-Anomaly-Detection-master\autoencoder\autoencoder.py", line 231, in custom_lr_estimate
self.lr_opt_i = np.argwhere(segment < optimal_loss)[0][0]
IndexError: index 0 is out of bounds for axis 0 with size 0

@init-22
Copy link

init-22 commented Apr 19, 2021

@simplew2011 did you solve this?

@pandego
Copy link

pandego commented Apr 20, 2021

I was having the same issue, only when using custom datasets... it worked fine with MVTEC datasets.
Solved it by increasing the size of the dataset (number of images).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants