bhky / opennsfw2

Keras implementation of the Yahoo Open-NSFW model
MIT License
361 stars 47 forks source link

ERROR WITH NO ERROR #7

Closed fog88 closed 2 years ago

fog88 commented 2 years ago

Hi, I don't understand what happened with opennsfw2 code. My installation is OK. I install Keras and Tensorflow 2.0 with CUDA but nothing, Any idea ? I attached a screenshot. Thank you to help me 0008_2022-09-10_17_heures_18

bhky commented 2 years ago

Hi! Thank you for the message and your interest in the library.

My guess is that, the auto downloading of the weights file does not work on a Windows machine because of some path issues. Please try downloading the weights file manually from here, and follow this example (you have to supply the weights_path, see here). It should work. Thanks!

fog88 commented 2 years ago

I going to solve the problem but I've got a question : where is the function load_weights ??? It's called but there is no write in file

fog88 commented 2 years ago

0005_2022-09-11_15_heures_27

bhky commented 2 years ago

The model is a tf.keras.Model object, it already has a load_weights method, you may take a look at the official doc.

fog88 commented 2 years ago

I've found what is wrong. Thank you for the method load_weight it is from tensorflow like predict() method. I understand now. My mistake is my CUDA CuDNN. I don't why but I'm sure because python is something wrong just there when it load CuDNN

bhky commented 2 years ago

Is it working now? :thinking:

fog88 commented 2 years ago

Yeah It work ! I've changed path in _download.py and I reinstall CUDA. Good ! Thanks !