from torchvision import transforms as T
trans = T.Compose([ T.ToTensor(),T.Normalize((.222,.222,.222),(.222,.222,.222))])
for img in img_fils:
img = trans(img)
Suppose the img_files have loaded, I found that my CPU usage may higher than 1000% on the server.
I thought the problem is that F.normalize used multi-threads in CPU mode. However, the speed is not so fast by using so many resources.
I wanna know if torch uses multi-threads in most of the functions in CPU mode by default?