-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing trained anomaly detector: Error: None values not supported #38
Comments
It seems using celebA instead of MNIST works well: 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 model
python main.py --dataset mnist --input_height=28 --output_height=28 --train
3) Prepare test data
Downloaded sample images and put them to
test_data
folder4) Run anomaly detection
python 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]
The text was updated successfully, but these errors were encountered: