@PedsB, I am not exactly sure if this is the most efficient way to do the multiple internal passes but firstly have you checked for other running processes that are taking up the GPU memory?
Maybe, kill 'em all: kill -9 $(nvidia-smi | sed -n 's/|\s*[0-9]*\s*\([0-9]*\)\s*.*/\1/p' | sort | uniq | sed '/^$/d')
Secondly, the problem could be at this line of code: vol_std = np.zeros((img_batch_size, num_passes))
What’s your batch_size?
Maybe, use a smaller batch size.
Thanks