examples/mnist_example.rb in ruby-dnn-0.5.9 vs examples/mnist_example.rb in ruby-dnn-0.5.10

- old
+ new

@@ -1,20 +1,19 @@ require "dnn" require "dnn/lib/mnist" #require "numo/linalg/autoloader" -include Numo include DNN::Layers include DNN::Activations include DNN::Optimizers Model = DNN::Model MNIST = DNN::MNIST x_train, y_train = MNIST.load_train x_test, y_test = MNIST.load_test -x_train = SFloat.cast(x_train).reshape(x_train.shape[0], 784) -x_test = SFloat.cast(x_test).reshape(x_test.shape[0], 784) +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::Util.to_categorical(y_train, 10)