I run the model on P40 to make inferences,it will consume 50%+ CPU resources when start 4 processes. I found the reason for the problem is to process the pictures when executing 'transformations' operation. Are there some methods to optimize the problem?
I run the model on P40 to make inferences,it will consume 50%+ CPU resources when start 4 processes. I found the reason for the problem is to process the pictures when executing 'transformations' operation. Are there some methods to optimize the problem?
transformations = transforms.Compose([transforms.Scale(224),transforms.CenterCrop(224), transforms.ToTensor(),transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])]) img = transformations(img)