@Ayazzia01, try choosing the “Restart and Clear Output” option from the Kernel menu to get your environment to a nice, clean state and see if that fixes the problem.
Also, to help avoid this kind of issue in the future, see this post: Staff Announcement: RuntimeError: CUDA error: out of memory FIX