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
b75ed18c
Commit
b75ed18c
authored
May 06, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto-download svhn. update resnet perf numbers.
parent
fb43cf03
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
examples/ResNet/README.md
examples/ResNet/README.md
+2
-2
tensorpack/dataflow/dataset/svhn.py
tensorpack/dataflow/dataset/svhn.py
+5
-3
tensorpack/train/multigpu.py
tensorpack/train/multigpu.py
+4
-3
tensorpack/utils/fs.py
tensorpack/utils/fs.py
+1
-1
No files found.
examples/ResNet/README.md
View file @
b75ed18c
...
...
@@ -16,8 +16,8 @@ To train, just run:
```
bash
./imagenet-resnet.py
--data
/path/to/original/ILSVRC
--gpu
0,1,2,3
-d
18
```
The speed is 1
860 samples/s on 4 TitanX Pascal, and 1160 samples/s on 4 old TitanX, 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.
The speed is 1
310 image/s on 4 Tesla M40, 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.

...
...
tensorpack/dataflow/dataset/svhn.py
View file @
b75ed18c
...
...
@@ -7,7 +7,7 @@ import os
import
numpy
as
np
from
...utils
import
logger
from
...utils.fs
import
get_dataset_path
from
...utils.fs
import
get_dataset_path
,
download
from
..base
import
RNGDataFlow
__all__
=
[
'SVHNDigit'
]
...
...
@@ -38,8 +38,10 @@ class SVHNDigit(RNGDataFlow):
data_dir
=
get_dataset_path
(
'svhn_data'
)
assert
name
in
[
'train'
,
'test'
,
'extra'
],
name
filename
=
os
.
path
.
join
(
data_dir
,
name
+
'_32x32.mat'
)
assert
os
.
path
.
isfile
(
filename
),
\
"File {} not found! Please download it from {}."
.
format
(
filename
,
SVHN_URL
)
if
not
os
.
path
.
isfile
(
filename
):
url
=
SVHN_URL
+
os
.
path
.
basename
(
filename
)
logger
.
info
(
"File {} not found! Downloading from {}."
.
format
(
filename
,
url
))
download
(
url
,
os
.
path
.
dirname
(
filename
))
logger
.
info
(
"Loading {} ..."
.
format
(
filename
))
data
=
scipy
.
io
.
loadmat
(
filename
)
self
.
X
=
data
[
'X'
]
.
transpose
(
3
,
0
,
1
,
2
)
...
...
tensorpack/train/multigpu.py
View file @
b75ed18c
...
...
@@ -81,9 +81,10 @@ class SyncMultiGPUTrainer(MultiGPUTrainer,
if
len
(
config
.
tower
)
>
1
:
assert
tf
.
test
.
is_gpu_available
()
if
not
isinstance
(
self
.
_input_method
,
StagingInputWrapper
):
devices
=
[
'/gpu:{}'
.
format
(
k
)
for
k
in
config
.
tower
]
self
.
_input_method
=
StagingInputWrapper
(
self
.
_input_method
,
devices
)
# doens't seem to improve on single GPU
if
not
isinstance
(
self
.
_input_method
,
StagingInputWrapper
):
devices
=
[
'/gpu:{}'
.
format
(
k
)
for
k
in
config
.
tower
]
self
.
_input_method
=
StagingInputWrapper
(
self
.
_input_method
,
devices
)
super
(
SyncMultiGPUTrainer
,
self
)
.
__init__
(
config
)
self
.
average_cost
=
average_cost
...
...
tensorpack/utils/fs.py
View file @
b75ed18c
...
...
@@ -58,7 +58,7 @@ def download(url, dir, filename=None):
raise
assert
size
>
0
,
"Download an empty file!"
# TODO human-readable size
print
(
'Succesfully downloaded '
+
filename
+
" "
+
str
(
size
)
+
' bytes.'
)
print
(
'Succesfully downloaded '
+
filename
+
"
.
"
+
str
(
size
)
+
' bytes.'
)
return
fpath
...
...
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