H-DenseUNet icon indicating copy to clipboard operation
H-DenseUNet copied to clipboard

Question about Training 3D Net

Open Charlotte0592 opened this issue 5 years ago • 6 comments

Hello, when I run CUDA_VISIBLE_DEVICES='0' python train_hybrid.py -arch 3dpart , there was a problem as the following:

Traceback (most recent call last):
      File "train_ hybrid.py". line 218, in <modules
      train_ and_ predict(args )
      File "train_ hybrid.py". line 146, in train and_ predict
      model. load_ weights (args .model_ weight, by_ name=True, by_ gpu=True, two_ model=True, by_ flag=True)File "Keras-2. 0.8/keras/engine/ topology.py" line 2621, in load_ weights
      load_ weights_ from_ hdf5_ group_ by_ name_ mulgpu_ twomodelcombine(f, self.layers, by_ flag)
      File "Keras-2 .0.8/keras/ engine/ topology.py" line 3276, in load weights_ from_ hdf5_ group_ by_ name_ mulgpu_ twomodelcombine
      f = f[' denseul6l']
      File "h5py/_ objects.pyx". line 54, in h5py._ objects .with_ phil . wrapperFile "h5py/_ objects.pyx", line 55, in h5py._ objects.with_ phil.wrapper
      File "/usr/local/lib/python2 .7/dist -packages/h5py/_ hl/group.py". line 177, in_ getitem__
      oid = h5o.open(self.id, self._ e(name), lapl=self._ lapl)
     File "h5py/_ objects.pyx", line 54, in h5py._ objects .with_ phil.wrapperFile "h5py/_ objects.pyx". line 55, in h5py._ objects .with_ phil.wrapperFile "h5py/h5o. pyx",. line 190, in h5py.h5o . open

KeyError: "Unable to open object (object ' denseul6l' doesn't exist)"

Why did this happen? How to solve it?

Charlotte0592 avatar Jul 26 '19 05:07 Charlotte0592

load the weights you train from 2d

mnc1423 avatar Jul 27 '19 06:07 mnc1423

i have the same question,could you tell me the solution? thanks a lot

anonymously123456 avatar Nov 18 '19 07:11 anonymously123456

The model can be downloaded from here:

https://drive.google.com/file/d/1HHiPBKPw539LR0Oj5g1gD3FNRkCsxeGi/view

place it in model/ directory

cheers!

mnc1423 avatar Nov 18 '19 09:11 mnc1423

thanks for you reply, I did what you said, downloaded the file and put it in model, but I still made a same mistake, do you know the reason and could you please tell me other solution? thanks so much.

Traceback (most recent call last): File "train_hybrid.py", line 218, in train_and_predict(args) File "train_hybrid.py", line 146, in train_and_predict model.load_weights(args.model_weight, by_name=True, by_gpu=True, two_model=True, by_flag=True) File "Keras-2.0.8/keras/engine/topology.py", line 2621, in load_weights load_weights_from_hdf5_group_by_name_mulgpu_twomodelcombine(f, self.layers, by_flag) File "Keras-2.0.8/keras/engine/topology.py", line 3276, in load_weights_from_hdf5_group_by_name_mulgpu_twomodelcombine f = f['denseu161'] File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "/home/wn/.conda/envs/wnpy27/lib/python2.7/site-packages/h5py/_hl/group.py", line 264, in getitem oid = h5o.open(self.id, self._e(name), lapl=self._lapl) File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py/h5o.pyx", line 190, in h5py.h5o.open KeyError: "Unable to open object (object 'denseu161' doesn't exist)"

anonymously123456 avatar Nov 18 '19 09:11 anonymously123456

If this is happening when your training the hybrid model load the weights you trained from the 2d part

python train_hybrid -model_weights /path/to/weights

mnc1423 avatar Nov 18 '19 10:11 mnc1423

Well, could you please tell me a new link for the model? I cannot download the model with this one. https://drive.google.com/file/d/1HHiPBKPw539LR0Oj5g1gD3FNRkCsxeGi/view

Juna2 avatar Jun 25 '20 09:06 Juna2