DigitalGrainSize / SediNet

Deep learning framework for optical granulometry (estimation of sedimentological variables from sediment imagery)
MIT License
68 stars 14 forks source link

Error using sedinet_predict1image.py #8

Open petermederer opened 3 years ago

petermederer commented 3 years ago

Hello,

i'm trying to use the model i trained with your example data on a single image.

python sedinet_predict1image.py \ -c config/config_9percentiles.json \ -w grain_size_global/res/global_9prcs_simo_batch12_im768_768_9vars_pinball_noaug.hdf5 \ -i images/Ortho_Val_1.tif

When trying to predict on a single image i get the following error message:

2020-12-04 14:16:37.541875: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll Mode: simo 2020-12-04 14:16:41.135387: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found 2020-12-04 14:16:41.143273: W tensorflow/stream_executor/cuda/cuda_driver.cc:312] failed call to cuInit: UNKNOWN ERROR (303) 2020-12-04 14:16:41.152211: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-PJHSMOD 2020-12-04 14:16:41.158273: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-PJHSMOD 2020-12-04 14:16:41.163730: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-12-04 14:16:41.188632: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x246bfda8650 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-12-04 14:16:41.200042: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version

It seems that this is due to my computer not having a NVDIA GPU. When i try to run tensorflow over CPU by setting USE_GPU = False i seem to be getting the same error.

Thank you in advance!

dbuscombe-usgs commented 3 years ago

Thanks for posting. To clarify, you get a nvcuda.dll not found error when you switch to GPU? That seems strange.

I would recommend using this method to force CPU usage: import os; os.environ["CUDA_VISIBLE_DEVICES"]="-1" (at the top of the script before any other imports)

dbuscombe-usgs commented 3 years ago

I ran the function and see there are a couple of bugs to resolve. I will try to work on these this week, with some new updates and improvements, please stay tuned for a new version, hopefully by end of week