hi guys, i am new to pytorch and i was wondering what will torch.cuda.empty_cache() do? and where should i add it?
for example,
for epoch in range(epochs):
   train(......)
   torch.cuda.empty_cache()
   val(....)

or
for epoch in range(epochs):
   train(......)
   val(....)
   torch.cuda.empty_cache()