Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
34f0dd6d
Commit
34f0dd6d
authored
Aug 27, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs update and fix bug in ResNet-SE
parent
f2b0f1be
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
docs/tutorial/summary.md
docs/tutorial/summary.md
+2
-0
examples/ResNet/README.md
examples/ResNet/README.md
+1
-1
examples/ResNet/imagenet-resnet-se.py
examples/ResNet/imagenet-resnet-se.py
+1
-1
tensorpack/tfutils/sesscreate.py
tensorpack/tfutils/sesscreate.py
+1
-1
tensorpack/utils/viz.py
tensorpack/utils/viz.py
+4
-4
No files found.
docs/tutorial/summary.md
View file @
34f0dd6d
...
...
@@ -47,3 +47,5 @@ are likely to have too much variance. You can:
Besides TensorFlow summaries,
a callback is free to log any other types of data to the monitor backend,
anytime after the training has started.
As long as the type of data is supported, it will be logged by each monitor.
In other words, tensorboard can show not only summaries in the graph, but also your custom data.
examples/ResNet/README.md
View file @
34f0dd6d
...
...
@@ -11,7 +11,7 @@ Models can be [downloaded here](https://goo.gl/6XjK9V).
| ResNet18 | 10.55% | 29.73% |
| ResNet34 | 8.51% | 26.50% |
| ResNet50 | 7.24% | 23.91% |
| ResNet50-SE |
6.42% | 22.94%
|
| ResNet50-SE |
TRAINING | TRAINING
|
| ResNet101 | 6.26% | 22.53% |
To train, just run:
...
...
examples/ResNet/imagenet-resnet-se.py
View file @
34f0dd6d
...
...
@@ -48,7 +48,7 @@ class Model(ModelDesc):
l
=
Conv2D
(
'conv3'
,
l
,
ch_out
*
4
,
1
)
squeeze
=
GlobalAvgPooling
(
'gap'
,
l
)
squeeze
=
FullyConnected
(
'fc1'
,
squeeze
,
ch_out
//
4
,
nl
=
tf
.
identity
)
squeeze
=
FullyConnected
(
'fc1'
,
squeeze
,
ch_out
//
4
,
nl
=
tf
.
nn
.
relu
)
squeeze
=
FullyConnected
(
'fc2'
,
squeeze
,
ch_out
*
4
,
nl
=
tf
.
nn
.
sigmoid
)
l
=
l
*
tf
.
reshape
(
squeeze
,
[
-
1
,
ch_out
*
4
,
1
,
1
])
return
l
+
resnet_shortcut
(
shortcut
,
ch_out
*
4
,
stride
)
...
...
tensorpack/tfutils/sesscreate.py
View file @
34f0dd6d
...
...
@@ -32,7 +32,7 @@ class NewSessionCreator(tf.train.SessionCreator):
sess
=
tf
.
Session
(
target
=
self
.
target
,
graph
=
self
.
graph
,
config
=
self
.
config
)
sess
.
run
(
tf
.
global_variables_initializer
())
sess
.
run
(
tf
.
local_variables_initializer
())
logger
.
info
(
"Global variables initialized."
)
logger
.
info
(
"Global
and local
variables initialized."
)
return
sess
...
...
tensorpack/utils/viz.py
View file @
34f0dd6d
...
...
@@ -118,7 +118,7 @@ class Canvas(object):
self
.
nr_col
=
nr_col
if
border
is
None
:
border
=
int
(
0.
1
*
min
(
ph
,
pw
))
border
=
int
(
0.
05
*
min
(
ph
,
pw
))
self
.
border
=
border
if
isinstance
(
bgcolor
,
int
):
...
...
@@ -169,9 +169,9 @@ def stack_patches(
Args:
patch_list(list[ndarray] or ndarray): NHW or NHWC images in [0,255].
nr_row(int), nr_col(int): rows and cols of the grid.
``nr_col * nr_row`` must be
equal to
``len(patch_list)``.
``nr_col * nr_row`` must be
no less than
``len(patch_list)``.
border(int): border length between images.
Defaults to ``0.
1
* min(patch_width, patch_height)``.
Defaults to ``0.
05
* min(patch_width, patch_height)``.
pad (boolean): when `patch_list` is a list, pad all patches to the maximum height and width.
This option allows stacking patches of different shapes together.
bgcolor(int or 3-tuple): background color in [0, 255]. Either an int
...
...
@@ -235,7 +235,7 @@ def gen_stack_patches(patch_list,
ph
,
pw
=
patch_list
.
shape
[
1
:
3
]
if
border
is
None
:
border
=
int
(
0.
1
*
min
(
ph
,
pw
))
border
=
int
(
0.
05
*
min
(
ph
,
pw
))
if
nr_row
is
None
:
nr_row
=
int
(
max_height
/
(
ph
+
border
))
if
nr_col
is
None
:
...
...
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