✨ tensorflow-vs-tensorflow-gpu
This commit is contained in:
parent
817d439b7d
commit
2e8ea7040a
1 changed files with 19 additions and 0 deletions
19
tensorflow-vs-tensorflow-gpu
Executable file
19
tensorflow-vs-tensorflow-gpu
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
for package in "tensorflow==1.15.*" "tensorflow-gpu==1.15.*"; do
|
||||
for CUDA_VISIBLE_DEVICES in "0" ""; do
|
||||
|
||||
echo "== $package, CUDA_VISIBLE_DEVICES='$CUDA_VISIBLE_DEVICES'"
|
||||
|
||||
export CUDA_VISIBLE_DEVICES
|
||||
|
||||
venv=/tmp/tmp.$RANDOM
|
||||
virtualenv --quiet -p /usr/bin/python3 $venv
|
||||
. $venv/bin/activate
|
||||
|
||||
pip3 install --quiet --upgrade pip
|
||||
pip3 install --quiet "$package"
|
||||
|
||||
python3 -c 'import tensorflow as tf; print("GPU available:", tf.test.is_gpu_available())'
|
||||
|
||||
done
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue