mdietrichstein / tensorflow-open_nsfw

Tensorflow Implementation of Yahoo's Open NSFW Model
Other
437 stars 138 forks source link

Help exporting to saved model #21

Open bho01 opened 5 years ago

bho01 commented 5 years ago

I am new to tensorflow and I need help exporting this model as a savedmodel to use it in tensorflowJS.

I used this command:

python export_savedmodel.py

and it returns this:

usage: export_savedmodel.py [-h] -i {tensor,base64_jpeg} [-v EXPORT_VERSION] -m MODEL_WEIGHTS target export_savedmodel.py: error: too few arguments

but I have no clue what to fill the arguments with.

Valentine23v commented 5 years ago

I just export model in Windows ,-m is the npy path, -i you should use tensor or base64_jpeg try this command python export_savedmodel.py -m D:\PyProject\tensorflow-open_nsfw-master\data\open_nsfw-weights.npy -i tensor D:\tfout
if you use linux ,you can try python export_savedmodel.py -m ./data/open_nsfw-weights.npy -i tensor ./tfout