Closed tyagi-iiitv closed 4 years ago
I use the following command to free the memory occupied by the Tf process, couldn't figure out any other solution. session.close() didn't work either.
for i in $(sudo lsof /dev/nvidia0 | grep python | awk '{print $2}' | sort -u); do sudo kill -9 $i; done
Remember to use your GPU number instead of nvidia0. Usually, in the case of multiple GPUs, indexing starts from 0 and forth.
Hi @tyagi-iiitv , I was just curious where to place these lines. Which script/loop, etc. Thanks
I use the following command to free the memory occupied by the Tf process, couldn't figure out any other solution. session.close() didn't work either.
for i in $(sudo lsof /dev/nvidia0 | grep python | awk '{print $2}' | sort -u); do sudo kill -9 $i; done
Remember to use your GPU number instead of nvidia0. Usually, in the case of multiple GPUs, indexing starts from 0 and forth.