Coder Social home page Coder Social logo

Input & output node names about dh3d HOT 4 CLOSED

cwlroda avatar cwlroda commented on July 20, 2024
Input & output node names

from dh3d.

Comments (4)

JuanDuGit avatar JuanDuGit commented on July 20, 2024

Hi, what's your output of the node list specifically?

from dh3d.

cwlroda avatar cwlroda commented on July 20, 2024

The link to the text file containing the node list is here (not posting directly as it's quite long)

This is the code I'm running to generate the node list:

with tf.Session(graph=tf.Graph()) as sess:
        # Restore local model
        loader = tf.compat.v1.train.import_meta_graph(
            trained_checkpoint_prefix + ".meta"
        )
        loader.restore(sess, trained_checkpoint_prefix)

        graph_def = tf.get_default_graph().as_graph_def()

        # All nodes to list
        node_list = [n.name for n in graph_def.node]

from dh3d.

JuanDuGit avatar JuanDuGit commented on July 20, 2024

Then "pointcloud" exists as a tensor instead of a node in the graph. That's why it does not appear in your node list.
It is not obvious to me what you are going to do with tf.Session, but it's not a proper way to run inference with a model restored from the metagraph as said in this link.
In our evaluation scripts, we use OfflinePreditor from tensorpack to do offline inference:

predictor = OfflinePredictor(pred_config)

You can refer to its docs for details on how it builds a graph and creates a session, etc .

from dh3d.

cwlroda avatar cwlroda commented on July 20, 2024

I have read through the tensorpack docs and figured out how to export to SavedModel format, thank you for your help!

Here's the skeleton code if anyone reading this in the future would like to perform the same task.

pred_config = PredictConfig(
    model=DH3D(config),
    session_init=SmartInit(trained_checkpoint_prefix),
    input_names=[
        "pointclouds",
    ],
    output_names=["xyz_feat", "xyz_feat_att"],
)

ModelExporter(pred_config).export_serving(export_dir)

from dh3d.

Related Issues (12)

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.