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
2bc3a766
Commit
2bc3a766
authored
Apr 03, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix svhn bug with shuffle
parent
8f3558e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tensorpack/dataflow/dataset/svhn.py
tensorpack/dataflow/dataset/svhn.py
+4
-2
No files found.
tensorpack/dataflow/dataset/svhn.py
View file @
2bc3a766
...
@@ -25,7 +25,11 @@ class SVHNDigit(DataFlow):
...
@@ -25,7 +25,11 @@ class SVHNDigit(DataFlow):
def
__init__
(
self
,
name
,
data_dir
=
None
,
shuffle
=
True
):
def
__init__
(
self
,
name
,
data_dir
=
None
,
shuffle
=
True
):
"""
"""
name: 'train', 'test', or 'extra'
name: 'train', 'test', or 'extra'
data_dir: a directory containing {train,test,extra}_32x32.mat
"""
"""
self
.
shuffle
=
shuffle
self
.
rng
=
get_rng
(
self
)
if
name
in
SVHNDigit
.
Cache
:
if
name
in
SVHNDigit
.
Cache
:
self
.
X
,
self
.
Y
=
SVHNDigit
.
Cache
[
name
]
self
.
X
,
self
.
Y
=
SVHNDigit
.
Cache
[
name
]
return
return
...
@@ -45,8 +49,6 @@ http://ufldl.stanford.edu/housenumbers/".format(filename)
...
@@ -45,8 +49,6 @@ http://ufldl.stanford.edu/housenumbers/".format(filename)
self
.
Y
[
self
.
Y
==
10
]
=
0
self
.
Y
[
self
.
Y
==
10
]
=
0
SVHNDigit
.
Cache
[
name
]
=
(
self
.
X
,
self
.
Y
)
SVHNDigit
.
Cache
[
name
]
=
(
self
.
X
,
self
.
Y
)
self
.
shuffle
=
shuffle
self
.
rng
=
get_rng
(
self
)
def
size
(
self
):
def
size
(
self
):
return
self
.
X
.
shape
[
0
]
return
self
.
X
.
shape
[
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