Giter VIP home page Giter VIP logo

Comments (7)

GabrielXia avatar GabrielXia commented on August 22, 2024

Hi @Yiman-GO, I tried something just like you did

with tf.Session() as sess:
    saver = tf.train.import_meta_graph('ResNet-L152.meta')
    saver.restore(sess, "ResNet-L152.ckpt")

And it worked fine, hope it helps !

from tensorflow-resnet.

Yiman-GO avatar Yiman-GO commented on August 22, 2024

@GabrielXia I tried but it doesn't work. Can I have a look at your code? I am confused where to add the code.
Also, have you had an implementation on your own data successfully? I abandoned the pretrained model but! it doesn't work. it said that loss is nan. I have no idea about it.
Thank you very much.

from tensorflow-resnet.

cardwing avatar cardwing commented on August 22, 2024

The following code works for me where I load the weight of 2D ResNet-50 model into 3D ResNet-50 model:
with tf.Session() as sess:
# build 3D ResNet-50
saver = tf.train.import_meta_graph('/DATA/houyn/pre-trained-models/models/ResNet-L50.meta')
saver.restore(sess, '/DATA/houyn/pre-trained-models/models/ResNet-L50.ckpt')
var_list = saver._var_list
value=[]
for i in range(265):
tmp = sess.run(var_list[i], feed_dict={})
if tmp.shape[0] < 10:
tmp = [tmp / 1.0 / tmp.shape[0] for _ in range(tmp.shape[0])]
tmp = np.stack(tmp, axis=0)
value.append(tmp)
You can use PyCharm to view the variable values and its names in the debug mode.

from tensorflow-resnet.

SongleChen2015 avatar SongleChen2015 commented on August 22, 2024

@cardwing can you tell me where i can download 3D ResNet-50 model, thanks.

from tensorflow-resnet.

cardwing avatar cardwing commented on August 22, 2024

@SongleChen2015, the following URL stores the model of 3d resnet-50, please check.
https://drive.google.com/open?id=1WkNtPNqf7-O1-RvXj4auWTH6OYqA2QKG

from tensorflow-resnet.

SongleChen2015 avatar SongleChen2015 commented on August 22, 2024

@cardwing I have downloaded the 3d resnet-50 model, thanks. Can you show me an example about how to define a 3d renset-50 network by using tensorflow ? Thanks again.

from tensorflow-resnet.

berylyellow avatar berylyellow commented on August 22, 2024

Hi @Yiman-GO, I tried something just like you did

with tf.Session() as sess:
    saver = tf.train.import_meta_graph('ResNet-L152.meta')
    saver.restore(sess, "ResNet-L152.ckpt")

And it worked fine, hope it helps !

When I do this, get:
ValueError: At least two variables have the same name: fc/biases
How to solve it?

from tensorflow-resnet.

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.