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
bb3cc9de
Commit
bb3cc9de
authored
Aug 17, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. adding color from np.array
parent
befe9e85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
nn_ds_neibs1_tmp.py
nn_ds_neibs1_tmp.py
+21
-3
No files found.
nn_ds_neibs1_tmp.py
View file @
bb3cc9de
...
@@ -588,8 +588,6 @@ def network_summary_w_b(scope, in_shape, out_shape, layout, index, network_scope
...
@@ -588,8 +588,6 @@ def network_summary_w_b(scope, in_shape, out_shape, layout, index, network_scope
tmp1
.
append
(
ts
)
tmp1
.
append
(
ts
)
imsum2
=
tf
.
concat
(
tmp1
,
axis
=
0
)
imsum2
=
tf
.
concat
(
tmp1
,
axis
=
0
)
print
(
"imsum2 shape: "
)
print
(
imsum2
.
shape
)
tf
.
summary
.
image
(
"inter_w8s"
,
tf
.
reshape
(
imsum2
,[
1
,
layout
[
index
]
*
cluster_side
*
(
block_side
+
1
)
//
4
,
4
*
cluster_side
*
(
block_side
+
1
),
3
]))
tf
.
summary
.
image
(
"inter_w8s"
,
tf
.
reshape
(
imsum2
,[
1
,
layout
[
index
]
*
cluster_side
*
(
block_side
+
1
)
//
4
,
4
*
cluster_side
*
(
block_side
+
1
),
3
]))
...
@@ -857,6 +855,9 @@ with tf.Session() as sess:
...
@@ -857,6 +855,9 @@ with tf.Session() as sess:
merged
=
tf
.
summary
.
merge_all
()
merged
=
tf
.
summary
.
merge_all
()
vis_placeholder
=
tf
.
placeholder
(
tf
.
float32
,
[
1
,
32
,
325
,
3
])
some_image2
=
tf
.
summary
.
image
(
'custom_test'
,
vis_placeholder
)
l1
=
NN_LAYOUT1
.
index
(
next
(
filter
(
lambda
x
:
x
!=
0
,
NN_LAYOUT1
)))
l1
=
NN_LAYOUT1
.
index
(
next
(
filter
(
lambda
x
:
x
!=
0
,
NN_LAYOUT1
)))
l2
=
NN_LAYOUT2
.
index
(
next
(
filter
(
lambda
x
:
x
!=
0
,
NN_LAYOUT2
)))
l2
=
NN_LAYOUT2
.
index
(
next
(
filter
(
lambda
x
:
x
!=
0
,
NN_LAYOUT2
)))
with
tf
.
variable_scope
(
'g_fc_sub'
+
str
(
l1
),
reuse
=
tf
.
AUTO_REUSE
):
with
tf
.
variable_scope
(
'g_fc_sub'
+
str
(
l1
),
reuse
=
tf
.
AUTO_REUSE
):
...
@@ -968,7 +969,24 @@ with tf.Session() as sess:
...
@@ -968,7 +969,24 @@ with tf.Session() as sess:
# _,_=sess.run([tf_ph_G_loss,tf_ph_sq_diff],feed_dict={tf_ph_G_loss:test_avg, tf_ph_sq_diff:test2_avg})
# _,_=sess.run([tf_ph_G_loss,tf_ph_sq_diff],feed_dict={tf_ph_G_loss:test_avg, tf_ph_sq_diff:test2_avg})
train_writer
.
add_summary
(
some_image
.
eval
(),
epoch
)
#train_writer.add_summary(some_image.eval(), epoch)
l1
=
NN_LAYOUT1
.
index
(
next
(
filter
(
lambda
x
:
x
!=
0
,
NN_LAYOUT1
)))
l2
=
NN_LAYOUT2
.
index
(
next
(
filter
(
lambda
x
:
x
!=
0
,
NN_LAYOUT2
)))
with
tf
.
variable_scope
(
'g_fc_sub'
+
str
(
l1
),
reuse
=
tf
.
AUTO_REUSE
):
w
=
tf
.
get_variable
(
'weights'
,
shape
=
[
325
,
32
])
wd
=
w
[
tf
.
newaxis
,
...
]
wds
=
tf
.
stack
([
wd
]
*
3
,
axis
=-
1
)
timg_min
=
tf
.
reduce_min
(
w
)
.
eval
()
timg_max
=
tf
.
reduce_max
(
w
)
.
eval
()
timg
=
wds
.
eval
()
timg
[:,:,:,
0
]
=
timg_min
timg
[:,:,:,
1
]
=
timg_min
timg
=
np
.
transpose
(
timg
,(
0
,
2
,
1
,
3
))
train_writer
.
add_summary
(
some_image2
.
eval
(
feed_dict
=
{
vis_placeholder
:
timg
}),
epoch
)
train_writer
.
add_summary
(
train_summary
,
epoch
)
train_writer
.
add_summary
(
train_summary
,
epoch
)
test_writer
.
add_summary
(
test_summaries
[
0
],
epoch
)
test_writer
.
add_summary
(
test_summaries
[
0
],
epoch
)
...
...
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