Closed xfby2016 closed 3 years ago
Hi. I fixed code. please clone repo and try again.
When I run the test phase of this project(mvtec/carpet),I got this error:
train.py", line 333, in test_step anomaly_map = score_patches[:,0].reshape((28,28)) ValueError: cannot reshape array of size 1024 into shape (28,28) Testing: 0%| | 0/117 [00:09<?, ?it/s] Any ideas? thank you !
I met the same problem, do you resolve?
This may be related to the size parameters you set,or you can change the shape to square root of the ValueError size : In my case: anomaly_map = score_patches[:,0].reshape((32,32))
This may be related to the size parameters you set,or you can change the shape to square root of the ValueError size : which size parameters is related with the reshape size, (32,32) or (28, 28) or others ? Is a correspondence?
This may be related to the size parameters you set,or you can change the shape to square root of the ValueError size : In my case: anomaly_map = score_patches[:,0].reshape((32,32))
And by the way, the time spent on ''Calculating distances...'' on my running is very very long with 28 CPU kernels and 3 GTX 2080Ti GPUs. Have you had the issue?
You can check score_patches[:,0] value
"ValueError: cannot reshape array of size 1024 into shape (28,28) " 28 should be replaced with a square root of 1024.
''Calculating distances...''maybe depending on the train dataset size and input_size you set
When I run the test phase of this project(mvtec/carpet),I got this error:
train.py", line 333, in test_step anomaly_map = score_patches[:,0].reshape((28,28)) ValueError: cannot reshape array of size 1024 into shape (28,28) Testing: 0%| | 0/117 [00:09<?, ?it/s] Any ideas? thank you !