标签:pre const tor print port .com oat ant run
# -*- coding: utf-8 -*-
"""
Spyder Editor
myhaspl@myhaspl.com
"""
import tensorflow as tf
import numpy as np
a=tf.constant(np.array([[6,2]],dtype=np.float32))
b=tf.constant([[3,6],[1,3]],dtype=tf.float32)
res=tf.matmul(a,b)
with tf.Session() as sess:
print sess.run(res)
[[20. 42.]]
标签:pre const tor print port .com oat ant run
原文地址:http://blog.51cto.com/13959448/2318746