Docker is the easiest way to run TensorFlow on a GPU since the host machine only requires the NVIDIA® driver (the NVIDIA® CUDA® Toolkit is not required).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Sep 2023 update: We've released official support for MediaPipe on Raspberry Pi. | |
## It provides many more features to what's available in TFLite Task Library. The guide | |
## below has been updated to use MediaPipe instead of TFLite Task Library. | |
## Check out this blog post to learn more: | |
## https://developers.googleblog.com/2023/08/mediapipe-for-raspberry-pi-and-ios.html | |
# Show your Raspberry Pi OS version. | |
cat /etc/os-release | |
# Update packages on your Raspberry Pi OS. |
In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def binomial(n, k): | |
""" | |
A fast way to calculate binomial coefficients by Andrew Dalke. | |
See http://stackoverflow.com/questions/3025162/statistics-combinations-in-python | |
""" | |
if 0 <= k <= n: | |
ntok = 1 | |
ktok = 1 | |
for t in xrange(1, min(k, n - k) + 1): | |
ntok *= n |