The high cpu usage in Pytorch, torchvision

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?

Yes, some 3rd party CPU libs can and will use multi-threading by default.
I think you could remove it via torch.set_num_threads as well as the env vars: