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
defced98
Commit
defced98
authored
Apr 16, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanups
parent
d2048681
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
examples/ImageNetModels/vgg16.py
examples/ImageNetModels/vgg16.py
+2
-4
No files found.
examples/ImageNetModels/vgg16.py
View file @
defced98
...
...
@@ -22,7 +22,7 @@ def GroupNorm(x, group, gamma_initializer=tf.constant_initializer(1.)):
"""
shape
=
x
.
get_shape
()
.
as_list
()
ndims
=
len
(
shape
)
assert
ndims
in
[
2
,
4
]
assert
ndims
==
4
,
shape
chan
=
shape
[
1
]
assert
chan
%
group
==
0
,
chan
group_size
=
chan
//
group
...
...
@@ -61,8 +61,7 @@ class Model(ImageNetModel):
weight_decay
=
5e-4
def
get_logits
(
self
,
image
):
with
argscope
(
Conv2D
,
kernel_size
=
3
,
kernel_initializer
=
tf
.
variance_scaling_initializer
(
scale
=
2.
)),
\
with
argscope
(
Conv2D
,
kernel_initializer
=
tf
.
variance_scaling_initializer
(
scale
=
2.
)),
\
argscope
([
Conv2D
,
MaxPooling
,
BatchNorm
],
data_format
=
'channels_first'
):
logits
=
(
LinearWrap
(
image
)
.
apply
(
convnormrelu
,
'conv1_1'
,
64
)
...
...
@@ -104,7 +103,6 @@ class Model(ImageNetModel):
def
get_data
(
name
,
batch
):
isTrain
=
name
==
'train'
global
args
augmentors
=
fbresnet_augmentor
(
isTrain
)
return
get_imagenet_dataflow
(
args
.
data
,
name
,
batch
,
augmentors
)
...
...
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