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
ecc33298
Commit
ecc33298
authored
Jun 17, 2016
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notes on svhn
parent
451925f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
examples/svhn-digit-convnet.py
examples/svhn-digit-convnet.py
+3
-7
No files found.
examples/svhn-digit-convnet.py
View file @
ecc33298
...
@@ -60,7 +60,6 @@ class Model(ModelDesc):
...
@@ -60,7 +60,6 @@ class Model(ModelDesc):
self
.
cost
=
tf
.
add_n
([
cost
,
wd_cost
],
name
=
'cost'
)
self
.
cost
=
tf
.
add_n
([
cost
,
wd_cost
],
name
=
'cost'
)
def
get_config
():
def
get_config
():
#anchors = np.mgrid[0:4,0:4][:,1:,1:].transpose(1,2,0).reshape((-1,2)) / 4.0
# prepare dataset
# prepare dataset
d1
=
dataset
.
SVHNDigit
(
'train'
)
d1
=
dataset
.
SVHNDigit
(
'train'
)
d2
=
dataset
.
SVHNDigit
(
'extra'
)
d2
=
dataset
.
SVHNDigit
(
'extra'
)
...
@@ -71,19 +70,16 @@ def get_config():
...
@@ -71,19 +70,16 @@ def get_config():
imgaug
.
Resize
((
40
,
40
)),
imgaug
.
Resize
((
40
,
40
)),
imgaug
.
Brightness
(
30
),
imgaug
.
Brightness
(
30
),
imgaug
.
Contrast
((
0.5
,
1.5
)),
imgaug
.
Contrast
((
0.5
,
1.5
)),
imgaug
.
GaussianDeform
(
# this is slow
imgaug
.
GaussianDeform
(
# this is slow
. only use it when you have lots of cpus
[(
0.2
,
0.2
),
(
0.2
,
0.8
),
(
0.8
,
0.8
),
(
0.8
,
0.2
)],
[(
0.2
,
0.2
),
(
0.2
,
0.8
),
(
0.8
,
0.8
),
(
0.8
,
0.2
)],
(
40
,
40
),
0.2
,
3
),
(
40
,
40
),
0.2
,
3
),
]
]
data_train
=
AugmentImageComponent
(
data_train
,
augmentors
)
data_train
=
AugmentImageComponent
(
data_train
,
augmentors
)
data_train
=
BatchData
(
data_train
,
128
)
data_train
=
BatchData
(
data_train
,
128
)
nr_proc
=
5
data_train
=
PrefetchData
(
data_train
,
5
,
5
)
data_train
=
PrefetchData
(
data_train
,
5
,
nr_proc
)
step_per_epoch
=
data_train
.
size
()
step_per_epoch
=
data_train
.
size
()
augmentors
=
[
augmentors
=
[
imgaug
.
Resize
((
40
,
40
))
]
imgaug
.
Resize
((
40
,
40
)),
]
data_test
=
AugmentImageComponent
(
data_test
,
augmentors
)
data_test
=
AugmentImageComponent
(
data_test
,
augmentors
)
data_test
=
BatchData
(
data_test
,
128
,
remainder
=
True
)
data_test
=
BatchData
(
data_test
,
128
,
remainder
=
True
)
...
...
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