Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
4874c96a
Commit
4874c96a
authored
Mar 19, 2016
by
Jiří Vahala
Browse files
VAE runner fixed, data needs different scaler
parent
70702f79
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
autoencoder/VariationalAutoencoderRunner.py
autoencoder/VariationalAutoencoderRunner.py
+3
-3
No files found.
autoencoder/VariationalAutoencoderRunner.py
View file @
4874c96a
...
...
@@ -9,8 +9,8 @@ from autoencoder.autoencoder_models.VariationalAutoencoder import VariationalAut
mnist
=
input_data
.
read_data_sets
(
'MNIST_data'
,
one_hot
=
True
)
def
standard
_scale
(
X_train
,
X_test
):
preprocessor
=
prep
.
Standard
Scaler
().
fit
(
X_train
)
def
min_max
_scale
(
X_train
,
X_test
):
preprocessor
=
prep
.
MinMax
Scaler
().
fit
(
X_train
)
X_train
=
preprocessor
.
transform
(
X_train
)
X_test
=
preprocessor
.
transform
(
X_test
)
return
X_train
,
X_test
...
...
@@ -21,7 +21,7 @@ def get_random_block_from_data(data, batch_size):
return
data
[
start_index
:(
start_index
+
batch_size
)]
X_train
,
X_test
=
standard
_scale
(
mnist
.
train
.
images
,
mnist
.
test
.
images
)
X_train
,
X_test
=
min_max
_scale
(
mnist
.
train
.
images
,
mnist
.
test
.
images
)
n_samples
=
int
(
mnist
.
train
.
num_examples
)
training_epochs
=
20
...
...
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