资源简介

代码片段和文件信息
#%%
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License Version 2.0 (the “License“);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing software
# distributed under the License is distributed on an “AS IS“ BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets(“MNIST_data/“ one_hot=True)
print(mnist.train.images.shape mnist.train.labels.shape)
print(mnist.test.images.shape mnist.test.labels.shape)
print(mnist.validation.images.shape mnist.validation.labels.shape)
import tensorflow as tf
sess = tf.InteractiveSession()
x = tf.placeholder(tf.float32 [None 784])
W = tf.Variable(tf.zeros([784 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x W) + b)
y_ = tf.placeholder(tf.float32 [None 10])
cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y) reduction_indices=[1]))
train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy)
tf.global_variables_initializer().run()
for i in range(1000):
batch_xs batch_ys = mnist.train.next_batch(100)
train_step.run({x: batch_xs y_: batch_ys})
correct_prediction = tf.equal(tf.argmax(y 1) tf.argmax(y_ 1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction tf.float32))
print(accuracy.eval({x: mnist.test.images y_: mnist.test.labels}))
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 841 2017-04-20 10:35 解压密码.txt
文件 1784 2017-03-18 21:48 TensorFlow实战代码——黄文坚\TensorFlow实战代码\3_2 HelloWorld.py
文件 5792 2017-03-18 21:46 TensorFlow实战代码——黄文坚\TensorFlow实战代码\4_2 AutoEncoer.py
文件 1992 2017-03-18 21:49 TensorFlow实战代码——黄文坚\TensorFlow实战代码\4_4 MLP.py
文件 2957 2017-03-18 21:57 TensorFlow实战代码——黄文坚\TensorFlow实战代码\5_2 CNN_MNIST.py
文件 5745 2017-03-18 21:57 TensorFlow实战代码——黄文坚\TensorFlow实战代码\5_3 CNN_CIFAR10.py
....... 7667 2017-03-18 21:46 TensorFlow实战代码——黄文坚\TensorFlow实战代码\6_1_AlexNet.py
....... 6608 2017-03-18 21:57 TensorFlow实战代码——黄文坚\TensorFlow实战代码\6_2_VGG.py
....... 18116 2017-03-18 21:57 TensorFlow实战代码——黄文坚\TensorFlow实战代码\6_3_InceptionNet.py
....... 17493 2017-03-18 21:58 TensorFlow实战代码——黄文坚\TensorFlow实战代码\6_4_ResNet.py
....... 8950 2017-03-18 21:51 TensorFlow实战代码——黄文坚\TensorFlow实战代码\7_1_Word2Vec.py
....... 9474 2017-03-18 21:50 TensorFlow实战代码——黄文坚\TensorFlow实战代码\7_2_LSTM.py
....... 4521 2017-03-18 21:47 TensorFlow实战代码——黄文坚\TensorFlow实战代码\7_3_BiRNN.py
....... 6861 2017-03-18 21:58 TensorFlow实战代码——黄文坚\TensorFlow实战代码\8_2_PolicyNetwork.py
....... 4481 2017-03-18 21:44 TensorFlow实战代码——黄文坚\TensorFlow实战代码\8_3_GridWorld.py
....... 8766 2017-03-18 21:44 TensorFlow实战代码——黄文坚\TensorFlow实战代码\8_3_Value_Network.py
....... 6503 2017-03-18 21:59 TensorFlow实战代码——黄文坚\TensorFlow实战代码\9_1_TensorBoard.py
....... 8930 2017-03-18 21:50 TensorFlow实战代码——黄文坚\TensorFlow实战代码\9_2_MultiGPU.py
....... 10556 2017-03-18 21:59 TensorFlow实战代码——黄文坚\TensorFlow实战代码\9_3_Distributed.py
文件 131 2017-04-05 10:33 TensorFlow实战代码——黄文坚\TensorFlow实战代码\Tensorflow and Word2vec.txt
目录 0 2017-11-13 21:35 TensorFlow实战代码——黄文坚\TensorFlow实战代码
目录 0 2017-04-20 10:31 TensorFlow实战代码——黄文坚
----------- --------- ---------- ----- ----
138168 22
相关资源
- 推箱子及人工智能寻路C 源代码
- 北航人工智能原理课大作业源代码,
- AI人工智能学习资料全套
- 用户网络行为画像 大数据中的用户网
- 中科院自动化所历年模式识别博士题
- 华南理工大学人工智能期末考试卷
- LabVIEW实现Fuzzy_PID的补充资源
- 微信小程序Demo/---欧拉蜜自然语言理解
- 微信小程序完整Demo--支持人工智能对
- 艾媒-2017年中国人工智能产业专题研究
- 工信部人工智能产业人才岗位能力标
- AMiner:2018年人工智能之自动驾驶研究
- 艾瑞咨询:2018年中国人工智能+金融行
- 2019技术趋势:人工智能报告
- 法院行业方案宣讲稿-海康
- 8.2 心智探奇 人类心智的起源与进化
- 人工智能尼尔森,2003,第1版
- 乌镇指数全球人工智能发展报告2017投
- 模式识别之特征选择
- springMVC的学习代码
- 人工智能全部课件和作业题
- 哥德尔、艾舍尔、巴赫——集异璧之
- 西电人工智能课件
- 面试题答案-40万年薪岗位面试到底问
- 旺宝创业计划书
- 人工智能综述
- 人工智能领域顶会AAAI 2018 论文列表
- AI 全套教学视频三
- 人工智能初步学习总结
- stm32实现的五子棋AI人机对战+人人对战
评论
共有 条评论