Thanks @charan_Vjy, @richard. I just read somewhere that .item() has to do something related to the computational graph, so I thought it might affect performance and memory in some way. I ran some tests and found no difference as such (at least with small models like AlexNet).