diff --git a/R-package/R/rnn_model.R b/R-package/R/rnn_model.R index 7a0c8be80bb8..86daa7ad8633 100644 --- a/R-package/R/rnn_model.R +++ b/R-package/R/rnn_model.R @@ -16,7 +16,7 @@ mx.model.init.params.rnn <- function(symbol, input.shape, initializer, ctx) { # Initialize the data iter mx.model.init.iter.rnn <- function(X, y, batch.size, is.train) { if (is.MXDataIter(X)) return(X) - shape <- dim(data) + shape <- dim(X) if (is.null(shape)) { num.data <- length(X) } else {