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
149ad4eb
You need to sign in or sign up before continuing.
Commit
149ad4eb
authored
Aug 02, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix rgb/bgr in ResNet script
parent
02a5d258
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
examples/ResNet/README.md
examples/ResNet/README.md
+6
-5
examples/ResNet/imagenet-resnet.py
examples/ResNet/imagenet-resnet.py
+1
-3
tensorpack/libinfo.py
tensorpack/libinfo.py
+3
-0
No files found.
examples/ResNet/README.md
View file @
149ad4eb
...
...
@@ -8,14 +8,15 @@ Models can be [downloaded here](https://goo.gl/6XjK9V).
| Model | Top 5 Error | Top 1 Error |
|:-------------------|-------------|------------:|
| ResNet 18 | 10.67% | 29.50% |
| ResNet 34 | 8.66% | 26.45% |
| ResNet 50 | 7.13% | 24.12% |
| ResNet 101 | 6.54% | 22.89% |
| ResNet18 | 10.55% | 29.73% |
| ResNet34 | 8.51% | 26.50% |
| ResNet50 | 7.24% | 23.91% |
| ResNet50-SE | 6.42% | 22.94% |
| ResNet101 | 6.26% | 22.53% |
To train, just run:
```
bash
./imagenet-resnet.py
--data
/path/to/original/ILSVRC
--gpu
0,1,2,3
-d
18
./imagenet-resnet.py
--data
/path/to/original/ILSVRC
--gpu
0,1,2,3
-d
50
```
You should be able to see good GPU utilization (around 95%), if your data is fast enough.
See the
[
tutorial
](
http://tensorpack.readthedocs.io/en/latest/tutorial/efficient-dataflow.html
)
on how to speed up your data.
...
...
examples/ResNet/imagenet-resnet.py
View file @
149ad4eb
...
...
@@ -45,9 +45,7 @@ class Model(ModelDesc):
def
_build_graph
(
self
,
inputs
):
image
,
label
=
inputs
# It should actually use bgr=True here, but for compatibility with
# pretrained models, we keep the wrong version.
image
=
image_preprocess
(
image
,
bgr
=
False
)
image
=
image_preprocess
(
image
,
bgr
=
True
)
if
self
.
data_format
==
'NCHW'
:
image
=
tf
.
transpose
(
image
,
[
0
,
3
,
1
,
2
])
...
...
tensorpack/libinfo.py
View file @
149ad4eb
...
...
@@ -25,4 +25,7 @@ os.environ['TF_ENABLE_WINOGRAD_NONFUSED'] = '1' # issue#9339
os
.
environ
[
'TF_AUTOTUNE_THRESHOLD'
]
=
'3'
# use more warm-up
os
.
environ
[
'TF_AVGPOOL_USE_CUDNN'
]
=
'1'
# issue#8566
import
tensorflow
as
tf
# noqa
assert
int
(
tf
.
__version__
.
split
(
'.'
)[
0
])
>=
1
,
"TF>=1.0 is required!"
__version__
=
'0.3.0'
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