Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do I have to rewrite test.py when I define the network without NiftyNet? #27

Open
BarryRun opened this issue Nov 24, 2018 · 1 comment

Comments

@BarryRun
Copy link

I didn't change test.py but the config file.
At the line 272(The third line here):
print(all_vars)
net1ax_vars = [x for x in all_vars if x.name[0:len(net_name1ax) + 1]==net_name1ax + '/']
saver1ax = tf.train.Saver(net1ax_vars)
saver1ax.restore(sess, config_net1ax['model_file'])

I got an error:
ValueError: No variables to save

I checked all_vars and I found it seems that no variable named begin with net_name1ax

I tried to make my network inherit from 'TrainableLayer' and add a line below in function init
super(MSNet, self).__init__(name=name)
But it didn't work

Do I have to rewrite the network by using NiftyNet?
Or rewrite test.py?

@taigw
Copy link
Owner

taigw commented Dec 3, 2018

Hi, what is the config file you used? Did you change the value of 'net_name'? If you have changed that, I think you need to re-train the model with your new network names.

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

No branches or pull requests

2 participants