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
02f41b25
Commit
02f41b25
authored
Aug 29, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct augmentors in resnet
parent
c2a38de9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
examples/ResNet/README.md
examples/ResNet/README.md
+2
-2
examples/ResNet/imagenet_resnet_utils.py
examples/ResNet/imagenet_resnet_utils.py
+5
-5
tensorpack/graph_builder/input_source_base.py
tensorpack/graph_builder/input_source_base.py
+1
-1
No files found.
examples/ResNet/README.md
View file @
02f41b25
...
...
@@ -8,9 +8,9 @@ Models can be [downloaded here](https://goo.gl/6XjK9V).
| Model | Top 5 Error | Top 1 Error |
|:-------------------|-------------|------------:|
| ResNet18 | 10.
55% | 29.73
% |
| ResNet18 | 10.
47% | 29.56
% |
| ResNet34 | 8.51% | 26.50% |
| ResNet50 | 7.
24% | 23.91
% |
| ResNet50 | 7.
16% | 23.72
% |
| ResNet50-SE | TRAINING | TRAINING |
| ResNet101 | 6.26% | 22.53% |
...
...
examples/ResNet/imagenet_resnet_utils.py
View file @
02f41b25
...
...
@@ -51,25 +51,25 @@ class GoogleNetResize(imgaug.ImageAugmentor):
def
fbresnet_augmentor
(
isTrain
):
"""
Augmentor used in fb.resnet.torch, for BGR images.
Augmentor used in fb.resnet.torch, for BGR images
in range [0,255]
.
"""
if
isTrain
:
augmentors
=
[
GoogleNetResize
(),
imgaug
.
RandomOrderAug
(
[
imgaug
.
Brightness
(
30
,
clip
=
False
),
imgaug
.
Contrast
((
0.
8
,
1.2
),
clip
=
False
),
[
imgaug
.
Brightness
Scale
((
0.6
,
1.4
)
,
clip
=
False
),
imgaug
.
Contrast
((
0.
6
,
1.4
),
clip
=
False
),
imgaug
.
Saturation
(
0.4
,
rgb
=
False
),
# rgb-bgr conversion
imgaug
.
Lighting
(
0.1
,
eigval
=
[
0.2175
,
0.0188
,
0.0045
][::
-
1
],
eigval
=
np
.
asarray
(
[
0.2175
,
0.0188
,
0.0045
][::
-
1
])
*
255.0
,
eigvec
=
np
.
array
(
[[
-
0.5675
,
0.7192
,
0.4009
],
[
-
0.5808
,
-
0.0045
,
-
0.8140
],
[
-
0.5836
,
-
0.6948
,
0.4203
]],
dtype
=
'float32'
)[::
-
1
,
::
-
1
]
)]),
imgaug
.
Clip
(),
imgaug
.
Flip
(
horiz
=
True
),
]
else
:
...
...
tensorpack/graph_builder/input_source_base.py
View file @
02f41b25
...
...
@@ -68,7 +68,7 @@ class InputSource(object):
Initialize/reinitialize this InputSource.
For training, it will get called by the trainer in `before_train` callbacks.
For inference, the :class:`InferenceRunner` will call
it each time it does
is triggered.
For inference, the :class:`InferenceRunner` will call
this method each time it
is triggered.
"""
self
.
_reset_state
()
...
...
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