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
544516ae
You need to sign in or sign up before continuing.
Commit
544516ae
authored
Aug 01, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inception v3
parent
f9bca2c4
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
311 additions
and
8 deletions
+311
-8
examples/Inception/inceptionv3.py
examples/Inception/inceptionv3.py
+302
-0
examples/README.md
examples/README.md
+1
-1
tensorpack/tfutils/sessinit.py
tensorpack/tfutils/sessinit.py
+8
-7
No files found.
examples/Inception/inceptionv3.py
0 → 100755
View file @
544516ae
This diff is collapsed.
Click to expand it.
examples/README.md
View file @
544516ae
...
@@ -10,5 +10,5 @@ Only allow examples with reproducible and meaningful performancce.
...
@@ -10,5 +10,5 @@ Only allow examples with reproducible and meaningful performancce.
+
[
char-rnn for fun
](
char-rnn
)
+
[
char-rnn for fun
](
char-rnn
)
+
[
DisturbLabel, because I don't believe the paper
](
DisturbLabel
)
+
[
DisturbLabel, because I don't believe the paper
](
DisturbLabel
)
+
[
DoReFa-Net, binary / low-bitwidth CNN on ImageNet
](
DoReFa-Net
)
+
[
DoReFa-Net, binary / low-bitwidth CNN on ImageNet
](
DoReFa-Net
)
+
[
GoogleNet-InceptionV1 with 71% accuracy
](
Inception
)
+
[
GoogleNet-InceptionV1 with 71% accuracy
and InceptionV3 with 73.5% accuracy
](
Inception
)
+
[
ResNet for Cifar10 with similar accuracy, and for SVHN with state-of-the-art accuracy
](
ResNet
)
+
[
ResNet for Cifar10 with similar accuracy, and for SVHN with state-of-the-art accuracy
](
ResNet
)
tensorpack/tfutils/sessinit.py
View file @
544516ae
...
@@ -129,16 +129,16 @@ class SaverRestore(SessionInit):
...
@@ -129,16 +129,16 @@ class SaverRestore(SessionInit):
chkpt_vars_used
.
add
(
name
)
chkpt_vars_used
.
add
(
name
)
#vars_available.remove(name)
#vars_available.remove(name)
else
:
else
:
logger
.
warn
(
"
Param {} not found in checkpoint! Will not restore.
"
.
format
(
v
.
op
.
name
))
logger
.
warn
(
"
Variable {} not found in checkpoint!
"
.
format
(
v
.
op
.
name
))
if
len
(
chkpt_vars_used
)
<
len
(
vars_available
):
if
len
(
chkpt_vars_used
)
<
len
(
vars_available
):
unused
=
vars_available
-
chkpt_vars_used
unused
=
vars_available
-
chkpt_vars_used
for
name
in
unused
:
for
name
in
unused
:
logger
.
warn
(
"
Param {} in checkpoint doesn't appear
in the graph!"
.
format
(
name
))
logger
.
warn
(
"
Variable {} in checkpoint doesn't exist
in the graph!"
.
format
(
name
))
return
var_dict
return
var_dict
class
ParamRestore
(
SessionInit
):
class
ParamRestore
(
SessionInit
):
"""
"""
Restore
trainable
variables from a dictionary.
Restore variables from a dictionary.
"""
"""
def
__init__
(
self
,
param_dict
):
def
__init__
(
self
,
param_dict
):
"""
"""
...
@@ -157,11 +157,12 @@ class ParamRestore(SessionInit):
...
@@ -157,11 +157,12 @@ class ParamRestore(SessionInit):
logger
.
info
(
"Params to restore: {}"
.
format
(
logger
.
info
(
"Params to restore: {}"
.
format
(
', '
.
join
(
map
(
str
,
intersect
))))
', '
.
join
(
map
(
str
,
intersect
))))
for
k
in
variable_names
-
param_names
:
for
k
in
variable_names
-
param_names
:
logger
.
warn
(
"Variable {} in the graph
won't be
restored!"
.
format
(
k
))
logger
.
warn
(
"Variable {} in the graph
not getting
restored!"
.
format
(
k
))
for
k
in
param_names
-
variable_names
:
for
k
in
param_names
-
variable_names
:
logger
.
warn
(
"Param {} not found in this graph!"
.
format
(
k
))
logger
.
warn
(
"Variable {} in the dict not found in this graph!"
.
format
(
k
))
upd
=
SessionUpdate
(
sess
,
[
v
for
v
in
variables
if
v
.
name
in
intersect
])
upd
=
SessionUpdate
(
sess
,
[
v
for
v
in
variables
if
v
.
name
in
intersect
])
logger
.
info
(
"Restoring from
param
dict ..."
)
logger
.
info
(
"Restoring from dict ..."
)
upd
.
update
({
name
:
value
for
name
,
value
in
six
.
iteritems
(
self
.
prms
)
if
name
in
intersect
})
upd
.
update
({
name
:
value
for
name
,
value
in
six
.
iteritems
(
self
.
prms
)
if
name
in
intersect
})
...
@@ -190,6 +191,6 @@ def dump_session_params(path):
...
@@ -190,6 +191,6 @@ def dump_session_params(path):
for
v
in
var
:
for
v
in
var
:
name
=
v
.
name
.
replace
(
":0"
,
""
)
name
=
v
.
name
.
replace
(
":0"
,
""
)
result
[
name
]
=
v
.
eval
()
result
[
name
]
=
v
.
eval
()
logger
.
info
(
"
Param
s to save to {}:"
.
format
(
path
))
logger
.
info
(
"
Variable
s to save to {}:"
.
format
(
path
))
logger
.
info
(
str
(
result
.
keys
()))
logger
.
info
(
str
(
result
.
keys
()))
np
.
save
(
path
,
result
)
np
.
save
(
path
,
result
)
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