faustomilletari / VNet

GNU General Public License v3.0
287 stars 122 forks source link

Divide by zero and Out of memory error #45

Open Jorisfournel opened 7 years ago

Jorisfournel commented 7 years ago

I get the following error :

VNet.py:53: RuntimeWarning: divide by zero encountered in divide weightData[defLab == 1] = np.prod(defLab.shape) / np.sum((defLab==1).astype(dtype=np.float32)) F1018 14:52:56.896700 11971 syncedmem.cpp:51] Check failed: error == cudaSuccess (2 vs. 0) out of memory Check failure stack trace: Abandon (core dumped)

Any idea ? Can the divide by zero be linked to the out of memory error or is it just that my GPU memory is too small ?

XYZ-916 commented 6 years ago

I have the same error as yours. And have you solved your problem? If solved, I'll appreciate it when you can share your solution with me. Thank you!

aditya985 commented 6 years ago

Try adding smoothing parameter in denominator