examples/vae.rb in ruby-dnn-0.16.2 vs examples/vae.rb in ruby-dnn-1.0.0

- old
+ new

@@ -7,19 +7,13 @@ include DNN::Layers include DNN::Optimizers include DNN::Losses x_train, y_train = DNN::MNIST.load_train -x_test, y_test = DNN::MNIST.load_test x_train = Numo::SFloat.cast(x_train).reshape(x_train.shape[0], 784) -x_test = Numo::SFloat.cast(x_test).reshape(x_test.shape[0], 784) x_train /= 255 -x_test /= 255 - -y_train = DNN::Utils.to_categorical(y_train, 10, Numo::SFloat) -y_test = DNN::Utils.to_categorical(y_test, 10, Numo::SFloat) $z_dim = 2 $z_mean = nil $z_sigma = nil