Git Product home page Git Product logo

Comments (7)

TechnikEmpire avatar TechnikEmpire commented on May 22, 2024

You don't want the outputs, you want the name of the final softmax later. That should be it. That layer's output is an array of length 5 representing the 5 classes

from nsfw_model.

 avatar commented on May 22, 2024

Thanks @TechnikEmpire for your reply. I'm aware that I need the softmax layers name but unfortunately, I can't seem to find it. Usually it appears under output but for some reason output is completely empty. Should I be using a different value as its name?? Thanks
image

from nsfw_model.

 avatar commented on May 22, 2024

should I be using dense_3 as it's name instead?

from nsfw_model.

 avatar commented on May 22, 2024

This is the value I usually take.
image

from nsfw_model.

TechnikEmpire avatar TechnikEmpire commented on May 22, 2024

@Nicolas-Connor No, you use the "name" field here. What these frameworks are doing is parsing the graph and looking for nodes with the names you provide to "input" and "output" and then it knows what are the nodes to feed data into and pull data out of.

In your case, "dense_3/Softmax" is what you'd take.

In the case of the newest model(s) (on the releases page here), the output would be "sequential/prediction/Softmax".

image

from nsfw_model.

TechnikEmpire avatar TechnikEmpire commented on May 22, 2024

@Nicolas-Connor Btw you might want to edit the picture you posted, I can see the name and path of your repository. From one guy to another developing content filtering software, let me share this with you:

You can convert the latest model (on the releases page) to Intel DLDT (compile openCV with Inference Engine support) with this command:

python mo_tf.py --input_model frozen_graph.pb --model_name [NEW_MODEL_FILE_NAME] --data_type FP16 --mean_values=[0,0,0] --input_shape=[1,224,224,3] --scale_values=[255,255,255] --enable_concat_optimization --reverse_input_channels

And then you can run inference in milliseconds on average hardware. I scan every image that comes across the network wire, including GIFS and you can't even observe any delay.

from nsfw_model.

 avatar commented on May 22, 2024

Wow, thanks a million @TechnikEmpire . Thanks for helping me out with trying to get my content filtering going, it looks like you've been down this road already with Technik Empire. And thanks for mentioning Intel DLDT, I'll be checking that out down the road.

I'm hitting another roadblock unfortunately but this seems to be an issue with the framework not supporting QuantizeV2 (whatever that is) rather than a issue with this model. I'll have to try and find more robust framework to integrate newer TF models in WPF C# applications.

Microsoft.ML.Transforms.TensorFlow.TFException: 'No OpKernel was registered to support Op 'QuantizeV2' used by {{node block_4_expand/convolution_eightbit/block_4_expand/kernel/read/quantize}}with these attrs: [T=DT_QUINT8, round_mode="HALF_AWAY_FROM_ZERO", mode="MIN_FIRST"]

from nsfw_model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.