Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scikit-luc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Luc Giffon
scikit-luc
Commits
8613f432
Commit
8613f432
authored
6 years ago
by
Luc Giffon
Browse files
Options
Downloads
Patches
Plain Diff
Mnist dataset tested
parent
b5ddb30b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
skluc/main/data/mldatasets/MnistDataset.py
+1
-5
1 addition, 5 deletions
skluc/main/data/mldatasets/MnistDataset.py
skluc/test/test_data/test_mldatasets/TestMnistDataset.py
+23
-0
23 additions, 0 deletions
skluc/test/test_data/test_mldatasets/TestMnistDataset.py
with
24 additions
and
5 deletions
skluc/main/data/mldatasets/MnistDataset.py
+
1
−
5
View file @
8613f432
...
...
@@ -55,11 +55,7 @@ class MnistDataset(ImageDataset):
def
read
(
self
):
"""
Return a dict of data where, for each key is associated a (data, label) tuple.
The values of the tuple are np.ndarray.
:return: dict
set the _train and _test attribute of dataset
"""
# todo add possibility to provide percentage for validation set instead of size
self
.
_train
=
LabeledData
(
...
...
This diff is collapsed.
Click to expand it.
skluc/test/test_data/test_mldatasets/TestMnistDataset.py
0 → 100644
+
23
−
0
View file @
8613f432
import
os
import
unittest
from
skluc.main.data.mldatasets
import
MnistDataset
class
TestMnistDataset
(
unittest
.
TestCase
):
def
test_mnist
(
self
):
mnist
=
MnistDataset
()
mnist
.
load
()
for
name
in
mnist
.
l_filepaths
:
self
.
assertTrue
(
os
.
path
.
exists
(
name
))
def
test_to_image
(
self
):
mnist
=
MnistDataset
()
mnist
.
load
()
mnist
.
to_image
()
self
.
assertTrue
(
mnist
.
train
.
data
[
0
].
shape
==
(
28
,
28
,
1
))
if
__name__
==
"
__main__
"
:
unittest
.
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment