koba-jon / pytorch_cpp

Deep Learning sample programs using PyTorch in C++
MIT License
241 stars 52 forks source link

DAGMM2d Upload #3

Closed koba-jon closed 3 years ago

koba-jon commented 3 years ago

Background

I created "Deep Autoencoding Gaussian Mixture Model" corresponding to 2-dimensional shape. I tried writing the code and it was a lot of fun. However, the part that calculates GMM parameters is complicated, and I don't know if my code is correct or not.

Open Review

I get the impression that the energy of the test phase is a little strange compared to the training phase. In addition, I also doubt whether or not the estimation network is trained. These source code for this subject are probably "networks.cpp", "train.cpp", "valid.cpp" and "test.cpp" in "DAGMM2d/src". I spent a lot of time debugging this problem, but in the end I couldn't solve it. It is unclear if there is a bug in the DAGMM as there may be such a specification. I would be pleased if you could help.

$ git clone -b feature/v1.6.0 https://github.com/koba-jon/pytorch_cpp.git
koba-jon commented 3 years ago

I found the cause of strange behavior of DAGMM. If we make the low-dimensional features of the model too large, the computation of the estimation network and Gaussian mixture parameters becomes complicated. This leads to degrade the performance of DAGMM.

As a result of improving its problem (e.g. "nz_c"=16), this model achieved AUC=1.0 in the toothbrush class of the MVTec AD dataset.