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
35527038
Commit
35527038
authored
Dec 29, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow zero weight_decay in ImagenetModel
parent
e15332fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
examples/FasterRCNN/data.py
examples/FasterRCNN/data.py
+2
-2
examples/ResNet/imagenet_utils.py
examples/ResNet/imagenet_utils.py
+9
-4
No files found.
examples/FasterRCNN/data.py
View file @
35527038
...
...
@@ -271,10 +271,10 @@ def get_eval_dataflow():
if
__name__
==
'__main__'
:
config
.
BASEDIR
=
'/
home/wyx
/data/coco'
config
.
BASEDIR
=
'/
private/home/yuxinwu
/data/coco'
config
.
TRAIN_DATASET
=
[
'train2014'
]
from
tensorpack.dataflow
import
PrintData
ds
=
get_train_dataflow
()
ds
=
get_train_dataflow
(
add_mask
=
config
.
MODE_MASK
)
ds
=
PrintData
(
ds
,
100
)
TestDataSpeed
(
ds
,
50000
)
.
start
()
ds
.
reset_state
()
...
...
examples/ResNet/imagenet_utils.py
View file @
35527038
...
...
@@ -156,10 +156,15 @@ class ImageNetModel(ModelDesc):
logits
=
self
.
get_logits
(
image
)
loss
=
ImageNetModel
.
compute_loss_and_error
(
logits
,
label
)
if
self
.
weight_decay
>
0
:
wd_loss
=
regularize_cost
(
'.*/W'
,
tf
.
contrib
.
layers
.
l2_regularizer
(
self
.
weight_decay
),
name
=
'l2_regularize_loss'
)
add_moving_summary
(
loss
,
wd_loss
)
self
.
cost
=
tf
.
add_n
([
loss
,
wd_loss
],
name
=
'cost'
)
else
:
self
.
cost
=
tf
.
identity
(
loss
,
name
=
'cost'
)
add_moving_summary
(
self
.
cost
)
@
abstractmethod
def
get_logits
(
self
,
image
):
...
...
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