i want to reduce the dimension of the MNIST data to 45.
i use keras to import MNIST data
library(keras) mnist <- dataset_mnist() X <- mnist$train