Code Monkey home page Code Monkey logo

Comments (1)

oafolabi avatar oafolabi commented on May 18, 2024 1

Yes, you may have to get the tensor that does that operation. For example, you may do something similar to the following:

You may restore the session and get the placeholders like this :

sess = tf.Session(config=config)

init = tf.global_variables_initializer()
sess.run(init)

saver = tf.train.import_meta_graph(META_GRAPH)
saver.restore(sess, tf.train.latest_checkpoint(LOG_DIR))

# We can now access the default graph where all our metadata has been loaded
graph = tf.get_default_graph()

# tmp = graph.get_operations()

# tmp = [n.name for n in graph.as_graph_def().node]

# print tmp

 
# placeholders we need
farthest_points_pl = graph.get_tensor_by_name('layer1/FarthestPointSample:0')
pointclouds_pl = graph.get_tensor_by_name('Placeholder:0')
pred_pl = graph.get_tensor_by_name('fc2/BiasAdd:0')

is_training_pl = graph.get_tensor_by_name('Placeholder_3:0')

META_GRAPH and LOG_DIR are directory paths you define.

Then run a forward pass:

TEST_DATASET = scannet_dataset.ScannetDatasetWholeScene(...)
batch_data, batch_label, batch_smpw = TEST_DATASET[scene_idx]
feed_dict = {pointclouds_pl: batch_data,
            is_training_pl: False}
farthest_points, pred_val = sess.run([farthest_points_pl,pred_pl], feed_dict=feed_dict)

farthest_points should give you something close to what you're looking for. Please see

def pointnet_sa_module(xyz, points, npoint, radius, nsample, mlp, mlp2, group_all, is_training, bn_decay, scope, bn=True, pooling='max', knn=False, use_xyz=True, use_nchw=False):

and it's containing file for more info.

Hopefully that helps.

from pointnet2.

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.