thirdwing commented on issue #7336: Data and label shape in-consistent
   I think we have this kind of examples in our document. See
   data(BostonHousing, package="mlbench")
   train.ind <- seq(1, 506, 3)
   train.x <- data.matrix(BostonHousing[train.ind, -(13:14)])
   train.y <- BostonHousing[train.ind, c(13:14)]
   test.x <- data.matrix(BostonHousing[-train.ind, -(13:14)])
   test.y <- BostonHousing[-train.ind, c(13:14)]
   data <- mx.symbol.Variable("data")
   fc2 <- mx.symbol.FullyConnected(data, num_hidden=2)
   lro2 <- mx.symbol.LinearRegressionOutput(fc2)
   train_iter = = t(train.x), label = t(train.y))
   model <- mx.model.FeedForward.create(lro2, X=train_iter,
                                        ctx=mx.cpu(), num.round=50, 
                                        learning.rate=2e-6, momentum=0.9)
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to