Skip to content

Instantly share code, notes, and snippets.

View supercrazysam's full-sized avatar
SUS

Sam Shum supercrazysam

SUS
  • ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
  • ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
View GitHub Profile
observation
(8, 5, 2)
[[[6.47 6.68 ]
[8.59 6.85 ]
[1.76 4.89 ]
[1.6 4.13 ]
[9.09 6.02 ]]
[[5.8599997 6.8199997]
[7.78 6.8399997]
@supercrazysam
supercrazysam / cuda_test.py
Created September 7, 2020 01:09
CUDA test script
import tensorflow as tf
if tf.test.gpu_device_name():
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
else:
print("Please install GPU version of TF")
import tensorflow as tf
with tf.device('/gpu:0'):
by adding
print("="*40)
print("obs")
print(type(obs))
print(obs)
print("="*40)
print("action")
print(type(action))
print(action)