Skip to content

Instantly share code, notes, and snippets.

View LujunWeng's full-sized avatar

LujunW LujunWeng

  • Adelaide, SA, Australia
View GitHub Profile
@yaroslavvb
yaroslavvb / gist:b73ff35424dd7ab762234620cf583aac
Created September 16, 2016 23:08
Example of restricting part of graph to run on single core
# try running cpu intensive test on two devices
import tensorflow as tf
import time
def matmul_op():
"""Multiply two matrices together"""
n = 2000
a = tf.ones((n, n), dtype=tf.float32)