#!/usr/bin/env python import tensorflow as tf from tensorflow.python.client import device_lib print(str(device_lib.list_local_devices() )) m1 = tf.constant([[1.0, 2.0]]) m2 = tf.constant([[3.0], [4.0]]) product = tf.matmul(m1, m2) with tf.Session() as session: result = session.run(product) print(result)
Comments