码迷,mamicode.com
首页 > 其他好文 > 详细

tensorflow-constant

时间:2018-11-19 20:06:41      阅读:95      评论:0      收藏:0      [点我收藏+]

标签: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.]]

tensorflow-constant

标签:pre   const   tor   print   port   .com   oat   ant   run   

原文地址:http://blog.51cto.com/13959448/2318746

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!