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

tensorflow-variable

时间:2018-12-03 14:04:52      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:python2   ted   creat   asp   pre   var   print   tensor   variable   

#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Sep 6 10:16:37 2018 @author: myhaspl @email:myhaspl@myhaspl.com """ import tensorflow as tf my_var=tf.Variable(1) mutop=my_var.assign(my_var*3) init=tf.initialize_all_variables() with tf.Session() as sess: sess.run(init) print sess.run(mutop) print sess.run(mutop) print sess.run(mutop)

3
9
27

tensorflow-variable

标签:python2   ted   creat   asp   pre   var   print   tensor   variable   

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

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