It gives that memory error but memory capacity is never reached. I have 60 GB of ram on the SSH and the full dataset process consumes 30 I am trying to train an autoendcoder with k-fold. Without k-fold the training works fine. The raw dataset contains 250,000 data in hdf5. With K-fold it works if I use less than 100000 of total data. I have converted it to float32 but still does not work. I have tried echo 1 as well but that kill the python program automatically