geo-deep-learning icon indicating copy to clipboard operation
geo-deep-learning copied to clipboard

Use pytorch's automatic mixed precision

Open remtav opened this issue 3 years ago • 0 comments

https://pytorch.org/docs/stable/amp.html

Tests with current inference script show that by simply wrapping the outputs = model(inputs) call in a context manager with autocast(device_type=device.type) speeds up inference by about 15% (tested on small image only). See pytorch's autocast.

remtav avatar Feb 23 '22 21:02 remtav