Reputation: 450
How to load MNIST dataset from KerasJS in Node?
I imported their header file
const KerasJS = require('keras-js')
var mnist = KerasJS.mnist
This gives no error, But whenever i try the load_data()
var x_train, y_train, x_test, y_test = mnist.load_data()
It gives error
TypeError: Cannot read property 'load_data' of undefined
So what is the acceptable syntax to load MNIST dataset by KerasJS in Node?
I also can't find anything much on their documentation.
Upvotes: 1
Views: 482
Reputation: 450
I found out another way to import mnist dataset in Nodejs, instead of requiring Keras-js use mnist
var mnist = require("mnist");
var set = mnist.set(8000,2000);
var trainingSet = set.training;
var testSet = set.test;
Upvotes: 2