人工智能TensorFlow-簡單的訓練示例

import tensorflow as tf import numpy as np # 使用numpy生成100個隨機點 x_data = np.random.rand(100) # 下面的公式相當於一條直線,斜率是0.1,偏移量是0.2 y_data = x_data * 0.1 + 0.2 # 構造一個線性模型 b = tf.Variable(0.) k = tf.Variable(0.)
相關文章
相關標籤/搜索