分享

使用TensorFlow实现SoftMax回归

Oner 2018-3-15 13:29:50 发表于 功能源码 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 5906
功能点

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)

已有(1)人评论

跳转到指定楼层
jiewuzhe02 发表于 2018-3-21 08:13:22
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条