Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
python3-imagej-tiff
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
python3-imagej-tiff
Commits
9c8f781e
Commit
9c8f781e
authored
Jul 12, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NaNs are already taken care of
parent
2b76d3d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
test_nn_feed.py
test_nn_feed.py
+4
-6
No files found.
test_nn_feed.py
View file @
9c8f781e
...
@@ -322,22 +322,20 @@ for epoch in range(lastepoch,lastepoch+len(tlist)):
...
@@ -322,22 +322,20 @@ for epoch in range(lastepoch,lastepoch+len(tlist)):
#print(input_patch)
#print(input_patch)
#print(gt_patch)
#print(gt_patch)
gt_patch
[
gt_patch
==-
256
]
=
np
.
nan
#
gt_patch[gt_patch==-256] = np.nan
gt_patch
[
np
.
isnan
(
gt_patch
)]
=
0
#
gt_patch[np.isnan(gt_patch)] = 0
input_patch
[
np
.
isnan
(
input_patch
)]
=
0
input_patch
[
np
.
isnan
(
input_patch
)]
=
0
skip_iteration
=
False
skip_iteration
=
False
if
values
[
i
,
j
,
0
]
==-
256
and
values
[
i
,
j
,
1
]
==-
256
:
print
(
"Have to SKIP!"
)
skip_iteration
=
True
# if nan skip run!
# if nan skip run!
if
np
.
isnan
(
np
.
sum
(
gt_patch
)):
if
np
.
isnan
(
np
.
sum
(
gt_patch
)):
print
(
"GT has NaNs"
)
skip_iteration
=
True
skip_iteration
=
True
if
np
.
isnan
(
np
.
sum
(
input_patch
)):
if
np
.
isnan
(
np
.
sum
(
input_patch
)):
print
(
"Patch has NaNs"
)
skip_iteration
=
True
skip_iteration
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment