facenet-pytorch-glint360k icon indicating copy to clipboard operation
facenet-pytorch-glint360k copied to clipboard

The cpu usage rate is very high

Open eeric opened this issue 4 years ago • 3 comments

the speed of training is slower, and the cpu usage rate is very high,about 800%, is there anything to solve it?

eeric avatar Aug 11 '21 07:08 eeric

@tamerthamoqa ,hi could you modified your data process by means as following: torch.utils.data.distributed.DistributedSampler() https://github.com/deepinsight/insightface/blob/7a84f849f215ec018f9a72879c9845355eb3b9d1/recognition/arcface_torch/dataset.py#L41

eeric avatar Aug 11 '21 07:08 eeric

Hello @eeric,

Could you clarify more? Are you fully using CPU because a GPU resource is not available?

The torch.utils.data.distributed.DistributedSampler() or the insightface dataset implementation may provide better peformance with DistributedDataParallel training, but unfortunately I will not be able to test this on my machine anytime soon.

tamerthamoqa avatar Aug 12 '21 04:08 tamerthamoqa

@tamerthamoqa fully using CPU, while GPU resource is not available.

eeric avatar Aug 12 '21 06:08 eeric