Giter VIP home page Giter VIP logo

Comments (3)

jackyko1991 avatar jackyko1991 commented on July 17, 2024

This is an old method to run the code in C++ with tensorflow. Check the node names in the checkpoint and graph file are identity.

Line 143 is to load the weighted values from the checkpoint file to name specific tf operation nodes.

I recommend to use TensorRT API for inference purposes. Take a look at the documentation: https://docs.nvidia.com/deeplearning/frameworks/tf-trt-user-guide/index.html#using-metagraph-checkpoint (2.2.3 TF-TRT 1.x Workflow With MetaGraph And Checkpoint Files) to convert ckpt and meta to .pb file.

After getting a frozen graph convert it to uff format: https://docs.nvidia.com/deeplearning/sdk/tensorrt-archived/tensorrt_401/tensorrt-api/python_api/workflows/tf_to_tensorrt.html

Then inference with TenorRT API: https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/sampleUffMNIST

from vnet-tensorflow.

ClementLagorce avatar ClementLagorce commented on July 17, 2024

Hello,

Thank you for the answer !

I tried to convert the frozen graph to uff format with your trained VNet implementation but it fail because there is no conversion function for some layers.
Could it come from the version of tensorflow used for the training step ?

Thanks !

from vnet-tensorflow.

ClementLagorce avatar ClementLagorce commented on July 17, 2024

Ok I ran your VNet on TF 1.8 and generated the pb graph with your meta_to_pb.py code also with TF 1.8. So now the line 143 of c++ inference is runing but the code stop to run without printing any error when it pass on the line (414, 415):

auto statusPred = m_sess->Run(input, { "predicted_label/prediction:0" }, {}, &predict);

The execution just stop after this without any error so I don't understand well what is going on. I am sure it is possible to run this old method c++ inference.

If you have any idea, thank you in advance !

from vnet-tensorflow.

Related Issues (19)

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.