Skip to content

Commit

Permalink
nvidia_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvictor committed May 12, 2017
1 parent 25feba9 commit 5acedf5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ EXPOSE 6006
EXPOSE 8888

WORKDIR "/home"
COPY nvidia_test.py
CMD python nvidia_test.py

CMD ["/run_jupyter.sh", "--allow-root"]
10 changes: 10 additions & 0 deletions nvidia_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import tensorflow as tf

# Creates a graph.
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print(sess.run(c))

0 comments on commit 5acedf5

Please sign in to comment.