功能点
TensorFlow实现softmax回归
运行环境
Python 2.7
Jupyter Notebook 4.3.0
代码预览
[mw_shl_code=python,true]import tensorflow as tf
sess = tf.Session()
x = tf.placeholder(tf.float32, shape=(None, 784), name="x")
W = tf.Variable(tf.zeros([784, 10]), name="weight")
b = tf.Variable(tf.zeros([10]), name="bais")
z = tf.matmul(x, W) + b
y = tf.nn.softmax(z)[/mw_shl_code]
代码下载
01. Softmax_Regression.zip
(3.25 KB, 下载次数: 1)
|