Skip to content
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

NaN Error Testing #9

Open
BobPetrocelli opened this issue Apr 8, 2018 · 1 comment
Open

NaN Error Testing #9

BobPetrocelli opened this issue Apr 8, 2018 · 1 comment

Comments

@BobPetrocelli
Copy link

I'm using Py3.6 and Cuda 9.1

Test runs to completion using prebuilt model then I get:

Traceback (most recent call last):
File "Main.py", line 81, in
main()
File "Main.py", line 12, in main
runTest()
File "Main.py", line 76, in runTest
ChexnetTrainer.test(pathDirData, pathFileTest, pathModel, nnArchitecture, nnClassCount, nnIsTrained, trBatchSize, imgtransResize, imgtransCrop, timestampLaunch)
File "/media/bob/curie/chexnet-master (2)/ChexnetTrainer.py", line 247, in test
aurocIndividual = ChexnetTrainer.computeAUROC(outGT, outPRED, nnClassCount)
File "/media/bob/curie/chexnet-master (2)/ChexnetTrainer.py", line 175, in computeAUROC
outAUROC.append(roc_auc_score(datanpGT[:, i], datanpPRED[:, i]))
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 277, in roc_auc_score
sample_weight=sample_weight)
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/metrics/base.py", line 75, in _average_binary_score
return binary_metric(y_true, y_score, sample_weight=sample_weight)
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 272, in _binary_roc_auc_score
sample_weight=sample_weight)
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 534, in roc_curve
y_true, y_score, pos_label=pos_label, sample_weight=sample_weight)
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 324, in _binary_clf_curve
assert_all_finite(y_score)
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/utils/validation.py", line 54, in assert_all_finite
_assert_all_finite(X.data if sp.issparse(X) else X)
File "/home/bob/.local/lib/python3.6/site-packages/sklearn/utils/validation.py", line 44, in _assert_all_finite
" or a value too large for %r." % X.dtype)
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').

@zoogzog
Copy link
Owner

zoogzog commented May 1, 2018

That is most likely the problem with the Cuda 9.1 library. The existing code was tested with Python 3.5 and Cuda 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants