ResNet-50 - a misleading machine learning inference benchmark for megapixel images: Page 4 of 5

July 01, 2019 //By Geoff Tate, CEO of Flex Logix Technologies Inc.
ResNet-50 source: Mahmood et al.
Geoff Tate looks at the shortcomings of ResNet-50 as an inference benchmark in machine learning and considers the importance of image size, batch size and throughput for assessing inference performance.

Most people assume that every model will have higher throughput at larger batch sizes.

However, this assumption is based on the common benchmarks most chips quote today, which is ResNet-50, GoogleNet, and MobileNet. It is important to note that the thing all of them have in common is image sizes that are not real-world: 224x224 or 299x299 or 408x408 even. All of these are smaller than even a VGA, a very old computer display standard, which is 640x480. Typical 2 megapixel image sensors are >40 times larger than 224x224.

As image size grows, the weight size doesn’t change. However, the size of intermediate activations grow proportionately with the larger input image size. The largest activation of any layer for ResNet-50 is 0.8MB, but when ResNet-50 is modified for 2 megapixel images, the largest activation grows to 33.5MB. Just for batch=1, on-chip SRAM storage for activations needs to be 33.5MB for the largest activation plus ½ that for the leading or following activation = 50MB. This itself is a large amount of on-chip SRAM and larger than the weights at 22.7MB. It might result in higher performance in this case to keep the weights on-chip and store at least larger activations in DRAM.

If you consider large batch sizes such as batch=10 for ResNet-50 at 2 Megapixel, there would need to be 500MB of on-chip SRAM to store all the temporary activations. Even the largest Chip C does not have enough SRAM for a large batch size. The increase in size in activations at megapixel images for ALL models is why large batch sizes don’t get higher throughput for megapixel images.

Next: Conclusion

Vous êtes certain ?

Si vous désactivez les cookies, vous ne pouvez plus naviguer sur le site.

Vous allez être rediriger vers Google.