Memory problems

First Problem:

RuntimeError: expected scalar type Float but found Double

I tried to fixed this by adding this:

i = i.float()
recon = model(i) #Training model

After this changing, I received:

not enough memory: you tried to allocate 10616832000 bytes.

It is about 10GB, I worked on CPU because my GPU is GTX 970 but i have 32GB of RAM and always have a amount of free 25 GB.

I received suggestion to force this to work on double (float64), is a any chance for that?
My input data is numpy array with matrices 480x480 (MRI data)

CPU: Intel(R) Core™ i7-6700K CPU @ 4.00GHz 4.01 GHz
RAM: 32,0 GB
GPU: GeForce GTX 970

This is university course project, so I don’t want to spend money for cloud GPU.

Based on the error message I don’t think you are running out of memory on your GPU but on your host, so you might want to double check the memory requirements of your script for host RAM.