Memory management - cuda programming

look this training loop shown, i have moved my inputs and labels to GPU by .to(device) command, as the inputs and labels needed only to the point of loss calculation, i need to simply erase the memory

allocated in the GPU for inputs and labels. so that i can utilise the same memory or without loss of memory for the next batch