Last active
January 18, 2019 11:07
-
-
Save phisad/d5f93c438661656084bb686863ba576a to your computer and use it in GitHub Desktop.
Tensorflow gpu starter (tensorflow-gpu 1.12 with CUDA 10.0)
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
import os | |
import tensorflow as tf; | |
# Just disables the warning, doesn't enable AVX/FMA | |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' | |
def main(): | |
tf.enable_eager_execution(); | |
result = tf.reduce_sum(tf.random_normal([1000,1000])) | |
print(result) | |
print("Setup successful") | |
if __name__ == "__main__": | |
main() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We can disable the warning log level because the standard version is supposed to support as many CPU as possible, but we do not have to care when using tensorflow with gpu. All credits go to https://stackoverflow.com/questions/47068709/your-cpu-supports-instructions-that-this-tensorflow-binary-was-not-compiled-to-u