denguir / student-teacher-anomaly-detection

Student–Teacher Anomaly Detection with Discriminative Latent Embeddings
181 stars 44 forks source link

anomaly_detection.py error #12

Open niuxiaoming1983 opened 2 years ago

niuxiaoming1983 commented 2 years ago

ValueError: Expected tensor to be a tensor image of size (C, H, W). Got tensor.size() = torch.Size([1, 3, 256, 256]).

Error: img_in = rearrange(unorm(inputs).cpu(), 'b c h w -> b h w c')

Do you have this error? Thank you!

denguir commented 2 years ago

Hi @niuxiaoming1983

can you tell me which parameters of anomaly_detection.py you used to get this error ?