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
4ecf58cb
Commit
4ecf58cb
authored
Aug 11, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed slicing errors
parent
7e1c6554
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
nn_ds_neibs1_tmp.py
nn_ds_neibs1_tmp.py
+10
-5
No files found.
nn_ds_neibs1_tmp.py
View file @
4ecf58cb
...
...
@@ -492,9 +492,9 @@ def network_summary_w_b(scope, in_shape, out_shape, layout, index, network_scope
block_side
=
math
.
ceil
(
math
.
sqrt
(
block_size
))
# if side^2 > size - need to expand with something
need_expanding
=
False
missing_in_block
=
0
if
math
.
pow
(
block_side
,
2
)
>
block_size
:
need_expanding
=
Tru
e
missing_in_block
=
math
.
pow
(
block_side
,
2
)
-
block_siz
e
tmp1
=
[]
for
i
in
range
(
layout
[
index
]):
...
...
@@ -502,9 +502,14 @@ def network_summary_w_b(scope, in_shape, out_shape, layout, index, network_scope
for
j
in
range
(
blocks_number
):
si
=
(
j
+
0
)
*
block_size
ei
=
(
j
+
1
)
*
block_size
# add expanding somewhere here:
# ...
tile
=
tf
.
reshape
(
wt
[
i
,
si
:
ei
],
shape
=
(
block_side
,
block_side
))
# wtm is expanded... only tested for 0
if
missing_in_block
!=
0
:
wtm
=
tf
.
concat
(
wt
[
i
,
si
:
ei
],
missing_in_block
*
[
tf
.
reduce_min
(
w
)])
else
:
wtm
=
wt
[
i
,
si
:
ei
]
tile
=
tf
.
reshape
(
wtm
,
shape
=
(
block_side
,
block_side
))
# stack to RGB
tiles
=
tf
.
stack
([
tile
]
*
3
,
axis
=
2
)
tiles
=
tf
.
concat
([
tiles
,
tf
.
expand_dims
((
block_side
+
0
)
*
[
grid
],
0
)],
axis
=
0
)
...
...
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