I ran a code about the deep learning network,first I trained the network,and it works well,but this error occurs when running to the validate network.
I have five epoch,
The error, which you has provided is shown, because you ran out of memory on your GPU. A way to solve it is to reduce the batch size until your code will run without this error.