Open burgetrm opened 4 years ago
It seems using celebA instead of MNIST works well:
1) Download data:
python download.py celebA
2) Train a model
python main.py --dataset celebA --input_height=28 --output_height=28 --train --batch_size=1024
3) Prepare test data
used the original data (test_01.png, test_02.png)
4) Run anomaly detection
python main.py --dataset celebA --input_height=28 --output_height=28 --batch_size=1024 --anomaly_test
Anyway, if anyone has a solution for MNIST, would be grateful.
It seems using celebA instead of MNIST works well: 1) Download data:
python download.py celebA
2) Train a modelpython main.py --dataset celebA --input_height=28 --output_height=28 --train --batch_size=1024
3) Prepare test data used the original data (test_01.png, test_02.png) 4) Run anomaly detectionpython main.py --dataset celebA --input_height=28 --output_height=28 --batch_size=1024 --anomaly_test
Anyway, if anyone has a solution for MNIST, would be grateful.
Could you please tell me what are in the test_data when I anomaly test mnist? i meet the same trouble and i think maybe the trouble is the test pics.
I also ran into this problem: I got the same error above when testing on the mnist dataset. Looking forward to your answers.
To repeat the issue: 1) Download data:
python download.py mnist
2) Train a modelpython main.py --dataset mnist --input_height=28 --output_height=28 --train
3) Prepare test data Downloaded sample images and put them totest_data
folder 4) Run anomaly detectionpython main.py --dataset mnist --batch_size=64 --input_height=28 --output_height=28 --crop --anomaly_test
Error:
Cause: https://github.com/LeeDoYup/AnoGAN/blob/4c650b3ab606a810c63cbb1f8289debbe25bb405/model.py#L478
https://github.com/LeeDoYup/AnoGAN/blob/4c650b3ab606a810c63cbb1f8289debbe25bb405/model.py#L428
Environment: Python 2.7 Tensorflow 1.14.0
Experiment no. 1 trying to solve the issue:
self.ano_y = tf.placeholder(tf.float32, [self.test_batch_size, self.y_dim], name='y')
Output:ValueError: Cannot reshape a tensor with 10 elements to shape [64,1,1,10] (640 elements) for 'generator_2/Reshape' (op: 'Reshape') with input shapes: [1,10], [4] and with input tensors computed as partial shapes: input[1] = [64,1,1,10].
similar results also with [1, 1, 1, self.y_dim] or [1, 1, self.y_dim]