Skip to content

Commit

Permalink
Fixed normalizeMinMax in U-Nets
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanHCenalmor committed Aug 1, 2023
1 parent 8b0f1e0 commit 021c2c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Colab_notebooks/U-Net_2D_Multilabel_ZeroCostDL4Mic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@
"# Simple normalization to min/max fir the Mask\n",
"def normalizeMinMax(x, dtype=np.float32):\n",
" x = x.astype(dtype,copy=False)\n",
" x = (x - np.amin(x)) / (np.amax(x) - np.amin(x))\n",
" x = (x - np.amin(x)) / (np.amax(x) - np.amin(x) + 1e-10)\n",
" return x\n",
"\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion Colab_notebooks/U-Net_2D_ZeroCostDL4Mic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
"# Simple normalization to min/max fir the Mask\n",
"def normalizeMinMax(x, dtype=np.float32):\n",
" x = x.astype(dtype,copy=False)\n",
" x = (x - np.amin(x)) / (np.amax(x) - np.amin(x))\n",
" x = (x - np.amin(x)) / (np.amax(x) - np.amin(x) + 1e-10)\n",
" return x\n",
"\n",
"\n",
Expand Down

0 comments on commit 021c2c0

Please sign in to comment.