ginobilinie / medSynthesisV1

This is a copy of package for medical image synthesis work with LRes-ResUnet and GAN (wgan-gp) in pytorch framework
MIT License
183 stars 45 forks source link

TypeError: 'float' object cannot be interpreted as an integer #9

Closed liuhh02 closed 4 years ago

liuhh02 commented 5 years ago

Thank you very much for the great repo! I am facing a problem when running the extract23DPatch4MultiModalImg.py file:

Traceback (most recent call last): File "", line 95, in extractPatch4OneSubject matFAOut=np.zeros([row+2marginD[0],col+2marginD[1],leng+2*marginD[2]],dtype=np.float16) TypeError: 'float' object cannot be interpreted as an integer

Is there any way I can fix this problem? Thank you!

lyc-lang commented 5 years ago

use // in margin1 = (dFA[0] - dSeg[0]) // 2 instead.