Skip to content
This repository was archived by the owner on Oct 19, 2019. It is now read-only.

How to get the activations of layers below prob? #2

Open
jazzsaxmafia opened this issue Dec 5, 2015 · 4 comments
Open

How to get the activations of layers below prob? #2

jazzsaxmafia opened this issue Dec 5, 2015 · 4 comments

Comments

@jazzsaxmafia
Copy link

Hello, thank you for this great source code.

I would like to use the FC layers below prob layer, but I am not sure how I should do it.
I tried something like "graph.get_tensor_by_name("import/fc7:0") but it does not work.

Thank you
-Taeksoo

@jazzsaxmafia
Copy link
Author

Just found out that the names of FC tensors were not set in "caffe_to_tensorflow.py". I guess it was the reason why.

By the way, when I run "caffe_to_tensorflow.py", by "make", it runs into an error like below.

current context was not created by the StreamExecutor cuda_driver API: 0x3c6ab90; a CUDA runtime call was likely performed without using a StreamExecutor context
make: *** [vgg16.tfmodel] Aborted (core dumped)

Could you please help me getting through this?

Thank you.

-Taeksoo

@seppemans
Copy link

I ran into the same issue.

The notes of caffe-tensorflow, a similar project, mention that

It appears that Caffe and TensorFlow cannot be concurrently invoked (CUDA conflicts - even with set_mode_cpu). This makes it a two-stage process: first extract the parameters with convert.py, then import it into TensorFlow.

The conversion ran successfully after installing the CPU-only version of Tensorflow. Not great, but it works.

@hamidpalangi
Copy link

Great work @ry, very useful!
@jazzsaxmafia : Try listing all Tensor names by:

    ops = sess.graph.get_operations()
    for i in xrange(len(ops)):
        print(ops[i].values())

then pick up the layer you want.

@Yelrose
Copy link

Yelrose commented Apr 24, 2016

@Palang2014 Thanks a lot! Your code do great helps!
And Great work @ry

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants