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
f698a04d
Commit
f698a04d
authored
Jan 01, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix: a line is missing in regularize
parent
8902af90
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
example_alexnet.py
example_alexnet.py
+2
-1
example_cifar10.py
example_cifar10.py
+2
-1
example_mnist.py
example_mnist.py
+2
-1
tensorpack/models/regularize.py
tensorpack/models/regularize.py
+3
-2
No files found.
example_alexnet.py
View file @
f698a04d
...
...
@@ -78,7 +78,8 @@ def get_model(inputs, is_training):
return
[
prob
,
nr_wrong
],
tf
.
add_n
([
wd_cost
,
cost
],
name
=
'cost'
)
def
get_config
():
log_dir
=
os
.
path
.
join
(
'train_log'
,
os
.
path
.
basename
(
__file__
)[:
-
3
])
basename
=
os
.
path
.
basename
(
__file__
)
log_dir
=
os
.
path
.
join
(
'train_log'
,
basename
[:
basename
.
rfind
(
'.'
)])
logger
.
set_logger_dir
(
log_dir
)
dataset_train
=
FakeData
([(
227
,
227
,
3
),
tuple
()],
10
)
...
...
example_cifar10.py
View file @
f698a04d
...
...
@@ -80,7 +80,8 @@ def get_model(inputs, is_training):
return
[
prob
,
nr_wrong
],
tf
.
add_n
([
wd_cost
,
cost
],
name
=
'cost'
)
def
get_config
():
log_dir
=
os
.
path
.
join
(
'train_log'
,
os
.
path
.
basename
(
__file__
)[:
-
3
])
basename
=
os
.
path
.
basename
(
__file__
)
log_dir
=
os
.
path
.
join
(
'train_log'
,
basename
[:
basename
.
rfind
(
'.'
)])
logger
.
set_logger_dir
(
log_dir
)
dataset_train
=
dataset
.
Cifar10
(
'train'
)
...
...
example_mnist.py
View file @
f698a04d
...
...
@@ -89,7 +89,8 @@ def get_model(inputs, is_training):
return
[
prob
,
nr_wrong
],
tf
.
add_n
([
wd_cost
,
cost
],
name
=
'cost'
)
def
get_config
():
log_dir
=
os
.
path
.
join
(
'train_log'
,
os
.
path
.
basename
(
__file__
)[:
-
3
])
basename
=
os
.
path
.
basename
(
__file__
)
log_dir
=
os
.
path
.
join
(
'train_log'
,
basename
[:
basename
.
rfind
(
'.'
)])
logger
.
set_logger_dir
(
log_dir
)
IMAGE_SIZE
=
28
...
...
tensorpack/models/regularize.py
View file @
f698a04d
...
...
@@ -25,6 +25,7 @@ def regularize_cost(regex, func):
costs
=
[]
for
p
in
params
:
name
=
p
.
name
if
re
.
search
(
regex
,
name
):
costs
.
append
(
func
(
p
))
_log_regularizer
(
name
)
return
tf
.
add_n
(
costs
)
...
...
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