Skip to content

Commit

Permalink
Update cvae_keras.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bojone authored Mar 18, 2018
1 parent 6559c81 commit dc540c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cvae_keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
num_classes = 10

# 加载MNIST数据集
(x_train, y_train), (x_test_, y_test_) = mnist.load_data()
(x_train, y_train_), (x_test, y_test_) = mnist.load_data()
x_train = x_train.astype('float32') / 255.
x_test = x_test.astype('float32') / 255.
x_train = x_train.reshape((len(x_train), np.prod(x_train.shape[1:])))
x_test = x_test.reshape((len(x_test), np.prod(x_test.shape[1:])))
y_train = keras.utils.to_categorical(y_train, num_classes)
y_test = keras.utils.to_categorical(y_test, num_classes)
y_train = to_categorical(y_train_, num_classes)
y_test = to_categorical(y_test_, num_classes)


x = Input(shape=(original_dim,))
Expand Down

0 comments on commit dc540c0

Please sign in to comment.