nsfw_model icon indicating copy to clipboard operation
nsfw_model copied to clipboard

How do I use the model in TensorFlow JS?

Open pottekkat opened this issue 5 years ago • 2 comments

Can anyone share the code of how I can use this model in tfjs?

const model = await tf.loadLayersModel('models/model.json')

I downloaded the model zip and loaded it as follows. How can I then use this in javascript code to access the model and classify images

pottekkat avatar Jul 07 '20 07:07 pottekkat

Best way to use this in TFJS is to use NSFWJS which is wrapped around this https://github.com/infinitered/nsfwjs

It even has GIF support

GantMan avatar Jul 07 '20 17:07 GantMan

Thanks I will check it out!

pottekkat avatar Jul 07 '20 18:07 pottekkat