Hi!

I’m working on cross-validation module for mlpack, and for better code coverage 
in tests I want to check some functionality on neural networks. For that I need 
to train a very simple feedforward neural network that is able to remember 
responses for training data. I tried the following:

  arma::mat data("1 2");
  arma::mat trainingResponses("1 2; 3 4");

  FFN<MeanSquaredError<>> ffn;
  ffn.Add<Linear<>>(1, 2);
  ffn.Add<ReLULayer<>>();

  ffn.Train(data, trainingResponses);

  arma::mat predictedResponses;
  ffn.Predict(data, predictedResponses);

After running this piece of code the predictedResponse matrix was the zero 
matrix (2x2) rather than something close to arma::mat("1 2; 3 4”). What did I 
do wrong?

I also have noticed that if I don’t add ReLULayer<>, than there is an error 
during training:

  unknown location:0: fatal error: in "CVTest/MSENNTest": signal: SIGABRT 
(application abort requested)

Is it possible to train a linear model with the FNN class (i.e. linear 
regression)?

Best regards,

Kirill Mishchenko



_______________________________________________
mlpack mailing list
[email protected]
http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack

Reply via email to