Comments (8)
Traceback (most recent call last):
File "train.py", line 43, in
model.train()
File "/home/ax/Anomaly/GANomaly/lib/model.py", line 280, in train
res = self.test()
File "/home/ax/Anomaly/GANomaly/lib/model.py", line 354, in test
auc = evaluate(self.gt_labels, self.an_scores, metric=self.opt.metric)
File "/home/ax/Anomaly/GANomaly/lib/evaluate.py", line 24, in evaluate
return roc(labels, scores)
File "/home/ax/Anomaly/GANomaly/lib/evaluate.py", line 49, in roc
fpr, tpr, _ = roc_curve(labels.numpy(), scores.numpy())
File "/home/ax/anaconda3/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 622, in roc_curve
y_true, y_score, pos_label=pos_label, sample_weight=sample_weight)
File "/home/ax/anaconda3/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 402, in _binary_clf_curve
assert_all_finite(y_score)
File "/home/ax/anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py", line 72, in assert_all_finite
_assert_all_finite(X.data if sp.issparse(X) else X, allow_nan)
File "/home/ax/anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py", line 56, in _assert_all_finite
raise ValueError(msg_err.format(type_err, X.dtype))
ValueError: Input contains NaN, infinity or a value too large for dtype('float32')
from ganomaly.
I guess the reason lies in the version of sklearn, or pytorch, But I don't know the exact version you used, waiting for your answer!
-------------------update-------------------
I down grade the version of sklearn, the error evaded, but the AUC result got nan:
Avg Run Time (ms/batch): 8.383 AUC: nan max AUC: 0.000
Could you please point out the reason?
from ganomaly.
have you run the code successufully? and how about the result?
from ganomaly.
have you run the code successufully? and how about the result?
I have run successfully, the result differs from the article, I got following AUC:
0.7897 , 0.4115 , 0.7857 , 0.6432 , 0.6759 , 0.7587, 0.745 , 0.5428 , 0.8484 , 0.5741
in MNIST, does this result make sense? Can you offer your result?
I modified the train step in code, because if not, it does not do any training, thus got NaN error. I make train step equal to ratio of number of samples and batch size per epoch.
from ganomaly.
sorry,I don't run this code.and does the result be similar with the test image?
from ganomaly.
have you run the code successufully? and how about the result?
I have run successfully, the result differs from the article, I got following AUC:
0.7897 , 0.4115 , 0.7857 , 0.6432 , 0.6759 , 0.7587, 0.745 , 0.5428 , 0.8484 , 0.5741
in MNIST, does this result make sense? Can you offer your result?I modified the train step in code, because if not, it does not do any training, thus got NaN error. I make train step equal to ratio of number of samples and batch size per epoch.
Could you provide your changed code?
from ganomaly.
I find this code not stable, then I tried this code:
https://github.com/caiya55/ganomaly-tensorflow , you can have a try, this code is much stable and easy to understand.
from ganomaly.
Thank you for your effective reply.
from ganomaly.
Related Issues (20)
- how can i balance the model HOT 7
- how can i see the result of test?? HOT 1
- How to distinguish a mnist_pic is normal or anomaly? HOT 17
- Sudden increase of err_d HOT 1
- Changes for Windows10
- Some qutestions about testing
- can it display where is the anomaly when inference? HOT 1
- what is the difference between fixed_fakes_*.png and fakes.png
- Is the testing function missing self.netg.eval? HOT 5
- AttributeError: module 'torch._C' has no attribute '_cuda_setDevice' HOT 4
- What's the performance of the model in terms of custom dataset?
- Can this code be used on sequence data? HOT 1
- How to use ganomaly neural network for single-channel data training
- Program stucks when the input image size is 224x224 HOT 2
- Experiment(To replicate the results in the paper for MNIST and CIFAR10 datasets)
- Testing
- Possible mode collapse HOT 1
- Test problem HOT 2
- Missing net.eval() in the testing code HOT 1
- ROC is changed every time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ganomaly.