You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from nsfw_detector import predict
model = predict.load_model("./nvme/renzhifei/nsfw/model/mobilenetv2.h5")
probs = predict.classify(model, '/nvme/renzhifei/nsfw/images_ko/')
print(probs)
I downloaded .h5 file from this url
I unzipped the file and renamed file “saved_model_weights.h5” as "mobilenetv2.h5"
I put .h5 file in the path: "./nvme/renzhifei/nsfw/model/"
When I run my python file, it notes as following:
2024-07-10 16:51:02.466112: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-07-10 16:51:02.468141: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2024-07-10 16:51:02.514406: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2024-07-10 16:51:02.514847: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-07-10 16:51:03.087415: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
File "demo.py", line 3, in
model = predict.load_model("./nvme/renzhifei/nsfw/model/mobilenetv2.h5")
File "/home/qa-caif-cicd/renzhifei/nsfw_model/nsfw_detector/predict.py", line 54, in load_model
raise ValueError("saved_model_path must be the valid directory of a saved model to load.")
ValueError: saved_model_path must be the valid directory of a saved model to load.
I want to kown how to solve this problem?
The text was updated successfully, but these errors were encountered:
Hi, Here is my code:
I downloaded .h5 file from this url
I unzipped the file and renamed file “saved_model_weights.h5” as "mobilenetv2.h5"
I put .h5 file in the path: "./nvme/renzhifei/nsfw/model/"
I want to kown how to solve this problem?
The text was updated successfully, but these errors were encountered: