MVTec-Anomaly-Detection icon indicating copy to clipboard operation
MVTec-Anomaly-Detection copied to clipboard

hist_dict = dict((key, self.hist.history[key]) for key in self.hist_keys) KeyError: 'ssim'

Open LinirZamir opened this issue 1 year ago • 3 comments

Hi,

I am running a simple test for training, I have all the prerequisites installed and I am training on the default MVTec dataset with the project organized as mentioned in the readme. This is the line of code I run to train: python train.py -d mvtec/capsule -a mvtecCAE -b 8 -l ssim -c grayscale

It starts nicely with 10 rounds of epochs, followed by (unknowingly why) a round of 1024 epochs, where it specify a max learning rate of 0.002. At around the 30th epochs of the second round, I get the following error and the program stops:

hist_dict = dict((key, self.hist.history[key]) for key in self.hist_keys) KeyError: 'ssim'

LinirZamir avatar Mar 12 '23 17:03 LinirZamir

I got the same error

blukaz avatar Aug 16 '23 10:08 blukaz

I had the same error when using a Tensorflow version >=2.11. The only thing I figured out to help was to downgrade to TF 2.10.1

In case somebody needs it: I used this Docker image: https://docs.nvidia.com/deeplearning/frameworks/tensorflow-release-notes/rel-22-12.html

burn4science avatar Nov 22 '23 14:11 burn4science

I am having the same issue working from google colab. Who else has tried this solution and did it work? How do I go about running this on google colab?

ubterko avatar Dec 22 '23 11:12 ubterko