[TensorFlow] demo1 导入tensorflow相关的包,并生成Weights和biases

来源:互联网 发布:淘宝类目会影响排名吗 编辑:程序博客网 时间:2024/05/24 23:11

import tensorflow as tfimport numpy as npx_data = np.random.rand(100).astype(np.float32)y_data = x_data*0.1 + 0.3#print(x_data)#print(y_data)Weights = tf.Variable(tf.random_uniform([1], -1.0, 1.0))biases = tf.Variable(tf.zeros([1]))print(Weights)print(Weights)



原创粉丝点击