You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a machine learning engineer, I want the library to work on MNIST so that I know it can at least get good results on the Hello World of machine learning.
The MNIST training test in MNISTSpec (which also appears in the new main README) is too slow and for that reason we have ignored it. That test needs to work for the first release. Here is the test in question, for reference.
// We ignore this test because it is too slow to converge, but we keep it as// our goal for the initial release.
ignore should "be easy to train a model on MNIST" in {
valxTrain= dataset._1.reshape(Array(60000, 28*28)).toFloat /255valyTrain= dataset._2.toCategorical().toFloat
assert(xTrain.flatten().forall(pixel => pixel >=0&& pixel <=1))
assert(yTrain.flatten().forall(label => label ==0|| label ==1))
valinput=Input[Float]("X", Array(None, Some(28*28)))
valinputLayer=InputLayer(input)
valdense1=Dense.withRandomWeights(inputLayer, 128)
valactivation1=Sigmoid(dense1)
valdense2=Dense.withRandomWeights(activation1, 10)
valactivation2=Sigmoid(dense2)
valmodel=Model(activation2)
valinputs=Map(input -> xTrain)
vallossFunctionBefore=Mean(
Square(Subtract(model.outputLayer.getComputationGraph, Constant(yTrain)))
)
vallossBefore= lossFunctionBefore.compute(inputs).flatten().head
valfittedModel= model.fit(inputs, yTrain, 10)
vallossFunctionAfter=Mean(
Square(
Subtract(fittedModel.outputLayer.getComputationGraph, Constant(yTrain))
)
)
vallossAfter= lossFunctionAfter.compute(inputs).flatten().head
assert(lossAfter < lossBefore)
}
The text was updated successfully, but these errors were encountered:
As a machine learning engineer, I want the library to work on MNIST so that I know it can at least get good results on the Hello World of machine learning.
The MNIST training test in MNISTSpec (which also appears in the new main README) is too slow and for that reason we have ignored it. That test needs to work for the first release. Here is the test in question, for reference.
The text was updated successfully, but these errors were encountered: