Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HAP_Tutorial_2018
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Josef Schmidt
HAP_Tutorial_2018
Commits
ccdec8bf
Commit
ccdec8bf
authored
7 years ago
by
JGlombitza
Browse files
Options
Downloads
Patches
Plain Diff
Add Mnist Loader
parent
b38b0779
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
MNIST_GAN/MNIST_GAN.py
+2
-2
2 additions, 2 deletions
MNIST_GAN/MNIST_GAN.py
with
2 additions
and
2 deletions
MNIST_GAN/MNIST_GAN.py
+
2
−
2
View file @
ccdec8bf
...
@@ -2,7 +2,7 @@ import numpy as np
...
@@ -2,7 +2,7 @@ import numpy as np
from
keras.layers
import
Input
from
keras.layers
import
Input
from
keras.models
import
Model
from
keras.models
import
Model
from
keras.optimizers
import
Adam
from
keras.optimizers
import
Adam
import
dlipr
import
mnist
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
keras.backend.tensorflow_backend
as
KTF
import
keras.backend.tensorflow_backend
as
KTF
from
gan
import
generator_model
,
discriminator_model
,
plot_images
,
make_trainable
,
get_session
from
gan
import
generator_model
,
discriminator_model
,
plot_images
,
make_trainable
,
get_session
...
@@ -11,7 +11,7 @@ from gan import generator_model, discriminator_model, plot_images, make_trainabl
...
@@ -11,7 +11,7 @@ from gan import generator_model, discriminator_model, plot_images, make_trainabl
log_dir
=
"
.
"
log_dir
=
"
.
"
KTF
.
set_session
(
get_session
())
# Allows 2 jobs per GPU, Please do not change this during the tutorial
KTF
.
set_session
(
get_session
())
# Allows 2 jobs per GPU, Please do not change this during the tutorial
# prepare MNIST dataset
# prepare MNIST dataset
data
=
dlipr
.
mnist
.
load_data
()
data
=
mnist
.
load_data
()
X_train
=
data
.
train_images
.
reshape
(
-
1
,
28
,
28
,
1
)
/
255.
X_train
=
data
.
train_images
.
reshape
(
-
1
,
28
,
28
,
1
)
/
255.
X_test
=
data
.
test_images
.
reshape
(
-
1
,
28
,
28
,
1
)
/
255.
X_test
=
data
.
test_images
.
reshape
(
-
1
,
28
,
28
,
1
)
/
255.
...
...
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