taigw / brats17

Brain tumor segmentation for MICCAI 2017 BraTS challenge
BSD 3-Clause "New" or "Revised" License
321 stars 130 forks source link

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

Open BarryRun opened 5 years ago

BarryRun commented 5 years ago

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 commented 5 years ago

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.