cvlab-yonsei / MNAD

An official implementation of "Learning Memory-guided Normality for Anomaly Detection" (CVPR 2020) in PyTorch.
333 stars 82 forks source link

RuntimeError #20

Open RohDonghyeon opened 3 years ago

RohDonghyeon commented 3 years ago

Prediction code is well utilized.

Thank you for the intuitive usage.

I am trying to learn about Reconstruction this time, but I encountered the following error.

RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[4, 15, 256, 256] to have 3 channels, but got 15 channels instead

The sample code you provided I entered python Train.py --method recon --loss_compact 0.01 --loss_separate 0.01 as it is, but I get the same error as above.

Is there any solution?

RohDonghyeon commented 3 years ago

The runtime error I asked above solved the problem by changing the t_length from 5 to 1.

I have a few additional questions, so I'll leave a post.

First, I understood that the word t_length is 1 means that the recon method is a method of inserting 1 input, creating 1 output, and conducting learning by comparing it with the input. Is it correct?

The second, If so, isn't the recon method a learning method using sequence data? When you put one input and get one output, I think the prediction is to set the next frame of the input as the ground truth and compare it with the output. If so, t_length should be set to at least 2, but the recon method is learned only when it is 1.

In conclusion, when t_length is 1, I would like to ask if it can be understood that in the recon method, which puts one input and produces one output, it can be understood as progressing learning by comparing it with the input when you insert your own input and create an output.