学习TensorFlow,Python 需要掌握到什么程度才可以

TensorFlow基于Python在windows系统中的安装 - 知乎专栏
{"debug":false,"apiRoot":"","paySDK":"/api/js","wechatConfigAPI":"/api/wechat/jssdkconfig","name":"production","instance":"column","tokens":{"X-XSRF-TOKEN":null,"X-UDID":null,"Authorization":"oauth c3cef7c66aa9e6a1e3160e20"}}
{"database":{"Post":{"":{"title":"TensorFlow基于Python在windows系统中的安装","author":"luo-can-82-63","content":"目前TensorFlow仅在windows系统中支持Python3.5.x版本第一步:下载并安装Anaconda注意:打开官网后,目前Anaconda版本最新为3.6,无法支持Tensorflow,我们不能下载3.6应该向下拖动,点击下图红圈部分进入Anaconda以往版本下载界面:选择Anaconda3-4.1.0-windows-x86.64.exe,进行下载安装。选择Anaconda3-4.1.0-windows-x86.64.exe,进行下载安装。TIPS:官网的下载速度可能很慢,或者下到中间停止下载,可通过下方网址下载,速度正常。第二步:安装完成后,打开电脑的命令窗口(在电脑左下角搜索powershell进入即可)我们在命令提示符里输入pip install tensorflow\n 如下图:通过pip下载并安装tensorflow,安装完成后:第三步:接着我们输入python检查我们的python版本是否为3.5,我的是3.5.1可以使用接着我们调用tensorflow库来进行测试分别输入import tensorflow as tf\n\nhello = tf.constant(\"hello,tensorflow!\")\n\nsess = tf.Session()\n\nprint(sess.run(hello))\n注意是一行行输入如果显示的结果为hello,tensorflow!表明我们的tensorflow安装成功!接着搭建自己的网络吧!下期见!最后安装过程中出现问题,请参考官方教程。","updated":"T04:59:16.000Z","canComment":false,"commentPermission":"anyone","commentCount":0,"collapsedCount":0,"likeCount":2,"state":"published","isLiked":false,"slug":"","isTitleImageFullScreen":false,"rating":"none","titleImage":"/v2-dc5948aeb8b3c3c8233816_r.png","links":{"comments":"/api/posts//comments"},"reviewers":[],"topics":[{"url":"/topic/","id":"","name":"神经网络"},{"url":"/topic/","id":"","name":"TensorFlow"},{"url":"/topic/","id":"","name":"机器学习"}],"adminClosedComment":false,"titleImageSize":{"width":863,"height":331},"href":"/api/posts/","excerptTitle":"","tipjarState":"inactivated","annotationAction":[],"sourceUrl":"","pageCommentsCount":0,"hasPublishingDraft":false,"snapshotUrl":"","publishedTime":"T12:59:16+08:00","url":"/p/","lastestLikers":[{"bio":null,"isFollowing":false,"hash":"621f115fdaacc3e1f7546d","uid":12,"isOrg":false,"slug":"yang-yiming-35","isFollowed":false,"description":"","name":"小鸽","profileUrl":"/people/yang-yiming-35","avatar":{"id":"6a4b33a8ef7f8bce9827a","template":"/{id}_{size}.jpg"},"isOrgWhiteList":false},{"bio":"在读博士","isFollowing":false,"hash":"e907db3758bbb3dd9ad3aca5ad4f0eb8","uid":92,"isOrg":false,"slug":"hu-mao-mao-50","isFollowed":false,"description":"","name":"胡猫猫","profileUrl":"/people/hu-mao-mao-50","avatar":{"id":"fe421b1efb5e","template":"/{id}_{size}.jpg"},"isOrgWhiteList":false}],"summary":"目前TensorFlow仅在windows系统中支持Python3.5.x版本第一步: 下载并安装Anaconda注意:打开官网后,目前Anaconda版本最新为3.6,无法支持Tensorflow,我们不能下载3.6应该向下拖动,点击下图红圈部分进入Anaconda以往版本下载界面…","reviewingCommentsCount":0,"meta":{"previous":null,"next":null},"annotationDetail":null,"commentsCount":0,"likesCount":2,"FULLINFO":true}},"User":{"luo-can-82-63":{"isFollowed":false,"name":"落残","headline":"摄影/段子/没有公众号\n\n我已加入“维权骑士”()的版权保护计划。","avatarUrl":"/v2-f2fbbb402b80eb8b06d38_s.jpg","isFollowing":false,"type":"people","slug":"luo-can-82-63","bio":"微信 tear_in_sea","hash":"c14af9cf2065edcfc6e602","uid":819700,"isOrg":false,"description":"摄影/段子/没有公众号\n\n我已加入“维权骑士”()的版权保护计划。","profileUrl":"/people/luo-can-82-63","avatar":{"id":"v2-f2fbbb402b80eb8b06d38","template":"/{id}_{size}.jpg"},"isOrgWhiteList":false,"badge":{"identity":null,"bestAnswerer":null}}},"Comment":{},"favlists":{}},"me":{},"global":{},"columns":{},"columnPosts":{},"columnSettings":{"colomnAuthor":[],"uploadAvatarDetails":"","contributeRequests":[],"contributeRequestsTotalCount":0,"inviteAuthor":""},"postComments":{},"postReviewComments":{"comments":[],"newComments":[],"hasMore":true},"favlistsByUser":{},"favlistRelations":{},"promotions":{},"switches":{"couldAddVideo":false},"draft":{"titleImage":"","titleImageSize":{},"isTitleImageFullScreen":false,"canTitleImageFullScreen":false,"title":"","titleImageUploading":false,"error":"","content":"","draftLoading":false,"globalLoading":false,"pendingVideo":{"resource":null,"error":null}},"drafts":{"draftsList":[],"next":{}},"config":{"userNotBindPhoneTipString":{}},"recommendPosts":{"articleRecommendations":[],"columnRecommendations":[]},"env":{"isAppView":false,"appViewConfig":{"content_padding_top":128,"content_padding_bottom":56,"content_padding_left":16,"content_padding_right":16,"title_font_size":22,"body_font_size":16,"is_dark_theme":false,"can_auto_load_image":true,"app_info":"OS=iOS"},"isApp":false},"sys":{}}TensorFlow 实验环境搭建
共发布过7门课程
楼赛 第14期
后邀请好友注册,您和好友将分别获赠3个实验豆!
购买成功!课程上线时,您将收到邮件提醒
一个实验正在进行,是否停止它,开始新实验?
为了让评估结果更加准确,请注意以下操作:
完成实验后点击「停止实验」按钮
将代码提交到代码库
尽可能详尽的撰写实验报告
尽可能在实验操作的关键步骤截图
尽可能减少无用操作
尽可能高效的利用内存/CPU资源
评估课还在不断完善中,我们真挚希望你能通过我们提供的这个平台,找到更好的发展机会。
谷歌开源了第二代深度学习系统TensorFlow,本教程为深度学习新手准备,介绍如何搭建TensorFlow实验环境并进行实践学习。
您有 -1 个实验豆,激活本课程需要消耗 0 个实验豆!
激活后可不限次数学习本课。
获取验证码
选择支付方式
下次自动登录
注册表示您已经同意我们的学习TensorFlow,Python 需要掌握到什么程度才可以? - 知乎155被浏览10125分享邀请回答0添加评论分享收藏感谢收起点击阅读原文
使用腾讯云GPU学习深度学习——2.Tensorflow 简明原理
5月15日 发布,来源:
这是《使用腾讯云GPU学习深度学习》系列文章的第二篇,主要介绍了 Tensorflow 的原理,以及如何用最简单的Python代码进行功能实现。本系列文章主要介绍如何使用
进行深度学习运算,前面主要介绍原理部分,后期则以实践为主。
往期内容:
1. 神经网络原理
神经网络模型,是上一章节提到的典型的监督学习问题,即我们有一组输入以及对应的目标输出,求最优模型。通过最优模型,当我们有新的输入时,可以得到一个近似真实的预测输出。
我们先看一下如何实现这样一个简单的神经网络:
输入 x = [1,2,3],
目标输出 y = [-0.85, 0.72]
中间使用一个包含四个单元的隐藏层。
结构如图:
求所需参数 w1_0 w2_0 b1_0 b2_0, 使得给定输入 x 下得到的输出 ,和目标输出
之间的平均均方误差 (Mean Square Errors, MSE) 最小化 。
我们首先需要思考,有几个参数?由于是两层神经网络,结构如下图(图片来源), 其中输入层为 3,中间层为 4,输出层是 2:
因此,其中总共包含 (3x4+4) + (4*2+2) = 26 个参数需要训练。我们可以如图初始化参数。参数可以随机初始化,也可以随便指定:
import numpy as np
w1_0 = np.array([[ 0.1, 0.2, 0.3, 0.4],
[ 0.5, 0.6, 0.7, 0.8],
[ 0.9, 1.0, 1.1, 1.2]])
w2_0 = np.array([[ 1.3, 1.4],
[ 1.5, 1.6],
[ 1.7, 1.8],
[ 1.9, 2.0]])
b1_0 = np.array( [-2.0, -6.0, -1.0, -7.0])
b2_0 = np.array( [-2.5, -5.0])
我们进行一次正向传播:
x = [1,2,3]
y = [-0.85, 0.72]
o1 = np.dot(x, w1_0 ) + b1_0
os1 = np.power(1+np.exp(o1*-1), -1)
o2 = np.dot(os1, w2_0) + b2_0
os2 = np.tanh(o2)
再进行一次反向传播:
alpha = 0.1
grad_os2 = (y - os2) * (1-np.power(os2, 2))
grad_os1 = np.dot(w2_0, grad_os2.T).T * (1-os1)*os1
grad_w2 = ...
grad_b2 = ...
w2_0 = w2_0 + alpha * grad_w2
b2_0 = b2_0 + alpha * grad_b2
如此反复多次,直到最终误差收敛。进行反向传播时,需要将所有参数的求导结果都写上去,然后根据求导结果更新参数。我这里就没有写全,因为一层一层推导实在是太过麻烦。更重要的是,当我们需要训练新的神经网络结构时,这些都需要重新推导一次,费时费力。
然而仔细想一想,这个推导的过程也并非无规律可循。即上一级的神经网络梯度输出,会被用作下一级计算梯度的输入,同时下一级计算梯度的输出,会被作为上一级神经网络的输入。于是我们就思考能否将这一过程抽象化,做成一个可以自动求导的框架?OK,以 Tensorflow 为代表的一系列深度学习框架,正是根据这一思路诞生的。
2.深度学习框架
近几年最火的深度学习框架是什么?毫无疑问,Tensorflow 高票当选。
但实际上,这些深度学习框架都具有一些普遍特征。Gokula Krishnan Santhanam认为,:
张量(Tensor)
基于张量的各种操作
计算图(Computation Graph)
自动微分(Automatic Differentiation)工具
BLAS、cuBLAS、cuDNN等拓展包
其中,张量 Tensor 可以理解为任意维度的数组——比如一维数组被称作向量(Vector),二维的被称作矩阵(Matrix),这些都属于张量。有了张量,就有对应的基本操作,如取某行某列的值,张量乘以常数等。运用拓展包其实就相当于使用底层计算软件加速运算。
我们今天重点介绍的,就是计算图模型,以及自动微分两部分。首先介绍以 Torch 框架为例,谈谈如何实现自动求导,然后再用最简单的方法,实现这两部分。
2.1. 深度学习框架如何实现自动求导
诸如 Tensorflow 这样的深度学习框架的入门,网上有大量的 几行代码、几分钟入门这样的资料,可以快速实现手写数字识别等简单任务。但如果想深入了解 Tensorflow 的背后原理,可能就不是这么容易的事情了。这里我们简单的谈一谈这一部分。
我们知道,当我们拿到数据、训练神经网络时,网络中的所有参数都是 变量。训练模型的过程,就是如何得到一组最佳变量,使预测最准确的过程。这个过程实际上就是,输入数据经过 正向传播,变成预测,然后预测与实际情况的误差 反向传播 误差回来,更新变量。如此反复多次,得到最优的参数。这里就会遇到一个问题,神经网络这么多层,如何保证正向、反向传播都可以正确运行?
值得思考的是,这两种传播方式,都具有 管道传播 的特征。正向传播一层一层算就可以了,上一层网络的结果作为下一层的输入。而反向传播过程可以利用 链式求导法则,从后往前,不断将误差分摊到每一个参数的头上。
图片来源:
进过抽象化后,我们发现,深度学习框架中的 每一个模块都需要两个函数,一个连接正向,一个连接反向。这里的正向和反向,如同武侠小说中的 任督二脉。而训练模型的过程,数据通过正向传播生成预测结果,进而将误差反向传回更新参数,就如同让真气通过任督二脉在体内游走,随着训练误差逐渐缩小收敛,深度神经网络也将打通任督二脉。
接下来,我们将首先审视一下 Torch 框架的源码如何实现这两部分内容,其次我们通过 Python 直接编写一个最简单的深度学习框架。
举 Torch 的 nn 项目的例子是因为Torch 的代码文件结构比较简单,Tensorflow 的规律和Torch比较近似,但文件结构相对更加复杂,有兴趣的可以仔细读读。
这个目录下的几乎所有 .lua 文件,都有这两个函数:
function xxx:updateOutput(input)
input.THNN.xxx_updateOutput(
input:cdata(),
self.output:cdata()
return self.output
function xxx:updateGradInput(input, gradOutput)
input.THNN.xxx_updateGradInput(
input:cdata(),
gradOutput:cdata(),
self.gradInput:cdata(),
self.output:cdata()
return self.gradInput
这里其实是相当于留了两个方法的定义,没有写具体功能。具体功能的代码,在
中用 C 实现实现,具体以 Sigmoid 函数举例。
我们知道 Sigmoid 函数的形式是:
代码实现起来是这样:
void THNN_(Sigmoid_updateOutput)( THNNState
*state, THTensor
*input, THTensor
THTensor_(resizeAs)(output, input);
TH_TENSOR_APPLY2(real, output, real, input,
*output_data = 1./(1.+ exp(- *input_data));
Sigmoid 函数求导变成:
所以这里在实现的时候就是:
void THNN_(Sigmoid_updateGradInput)(
THNNState *state,
THTensor *input,
THTensor *gradOutput,
THTensor *gradInput,
THTensor *output)
THNN_CHECK_NELEMENT(input, gradOutput);
THTensor_(resizeAs)(gradInput, output);
TH_TENSOR_APPLY3(real, gradInput, real, gradOutput, real, output,
real z = * output_
*gradInput_data = *gradOutput_data * (1. - z) *
大家应该注意到了一点, updateOutput 函数, output_data 在等号左边, input_data 在等号右边。 而 updateGradInput 函数, gradInput_data 在等号左边, gradOutput_data 在等号右边。 这里,output = f(input) 对应的是 正向传播 input = f(output) 对应的是 反向传播。
1.2 用 Python 直接编写一个最简单的深度学习框架
这部分内容属于“造轮子”,并且借用了优达学城的一个小型项目 。
数据结构部分
首先,我们实现一个父类 Node,然后基于这个父类,依次实现 Input Linear Sigmoid 等模块。这里运用了简单的 Python 。这些模块中,需要将 forward 和 backward 两个方法针对每个模块分别重写。
代码如下:
class Node(object):
Base class for nodes in the network.
Arguments:
`inbound_nodes`: A list of nodes with edges into this node.
def __init__(self, inbound_nodes=[]):
Node's constructor (runs when the object is instantiated). Sets
properties that all nodes need.
# A list of nodes with edges into this node.
self.inbound_nodes = inbound_nodes
# The eventual value of this node. Set by running
# the forward() method.
self.value = None
# A list of nodes that this node outputs to.
self.outbound_nodes = []
# New property! Keys are the inputs to this node and
# their values are the partials of this node with
# respect to that input.
self.gradients = {}
# Sets this node as an outbound node for all of
# this node's inputs.
for node in inbound_nodes:
node.outbound_nodes.append(self)
def forward(self):
Every node that uses this class as a base class will
need to define its own `forward` method.
raise NotImplementedError
def backward(self):
Every node that uses this class as a base class will
need to define its own `backward` method.
raise NotImplementedError
class Input(Node):
A generic input into the network.
def __init__(self):
Node.__init__(self)
def forward(self):
def backward(self):
self.gradients =
for n in self.outbound_nodes:
self.gradients[self] += n.gradients[self]
class Linear(Node):
Represents a node that performs a linear transform.
def __init__(self, X, W, b):
Node.__init__(self, [X, W, b])
def forward(self):
Performs the math behind a linear transform.
X = self.inbound_nodes[0].value
W = self.inbound_nodes[1].value
b = self.inbound_nodes[2].value
self.value = np.dot(X, W) + b
def backward(self):
Calculates the gradient based on the output values.
self.gradients =
for n in self.outbound_nodes:
grad_cost = n.gradients[self]
self.gradients[self.inbound_nodes[0]] += np.dot(grad_cost, self.inbound_nodes[1].value.T)
self.gradients[self.inbound_nodes[1]] += np.dot(self.inbound_nodes[0].value.T, grad_cost)
self.gradients[self.inbound_nodes[2]] += np.sum(grad_cost, axis=0, keepdims=False)
class Sigmoid(Node):
Represents a node that performs the sigmoid activation function.
def __init__(self, node):
Node.__init__(self, [node])
def _sigmoid(self, x):
This method is separate from `forward` because it
will be used with `backward` as well.
`x`: A numpy array-like object.
return 1. / (1. + np.exp(-x))
def forward(self):
Perform the sigmoid function and set the value.
input_value = self.inbound_nodes[0].value
self.value = self._sigmoid(input_value)
def backward(self):
Calculates the gradient using the derivative of
the sigmoid function.
self.gradients =
for n in self.outbound_nodes:
grad_cost = n.gradients[self]
sigmoid = self.value
self.gradients[self.inbound_nodes[0]] += sigmoid * (1 - sigmoid) * grad_cost
class Tanh(Node):
def __init__(self, node):
The tanh cost function.
Should be used as the last node for a network.
Node.__init__(self, [node])
def forward(self):
Calculates the tanh.
input_value = self.inbound_nodes[0].value
self.value = np.tanh(input_value)
def backward(self):
Calculates the gradient of the cost.
self.gradients =
for n in self.outbound_nodes:
grad_cost = n.gradients[self]
tanh = self.value
self.gradients[self.inbound_nodes[0]] += (1 + tanh) * (1 - tanh) * grad_cost.T
class MSE(Node):
def __init__(self, y, a):
The mean squared error cost function.
Should be used as the last node for a network.
Node.__init__(self, [y, a])
def forward(self):
Calculates the mean squared error.
y = self.inbound_nodes[0].value.reshape(-1, 1)
a = self.inbound_nodes[1].value.reshape(-1, 1)
self.m = self.inbound_nodes[0].value.shape[0]
self.diff = y - a
self.value = np.mean(self.diff**2)
def backward(self):
Calculates the gradient of the cost.
self.gradients[self.inbound_nodes[0]] = (2 / self.m) * self.diff
self.gradients[self.inbound_nodes[1]] = (-2 / self.m) * self.diff
调度算法与优化部分
优化部分则会在以后的系列中单独详细说明。这里主要将简单讲一下图计算的算法调度。就是实际上Tensorflow的各个模块会生成一个有向无环图,如下图(来源):
在计算过程中,几个模块存在着相互依赖关系,比如要计算模块1,就必须完成模块3和模块4,而要完成模块3,就需要在之前顺次完成模块5、2;因此这里可以使用 Kahn 算法作为调度算法(下面的 topological_sort 函数),从计算图中,推导出类似 5-&2-&3-&4-&1 的计算顺序。
def topological_sort(feed_dict):
Sort the nodes in topological order using Kahn's Algorithm.
`feed_dict`: A dictionary where the key is a `Input` Node and the value is the respective value feed to that Node.
Returns a list of sorted nodes.
input_nodes = [n for n in feed_dict.keys()]
nodes = [n for n in input_nodes]
while len(nodes) & 0:
n = nodes.pop(0)
if n not in G:
G[n] = {'in': set(), 'out': set()}
for m in n.outbound_nodes:
if m not in G:
G[m] = {'in': set(), 'out': set()}
G[n]['out'].add(m)
G[m]['in'].add(n)
nodes.append(m)
S = set(input_nodes)
while len(S) & 0:
n = S.pop()
if isinstance(n, Input):
n.value = feed_dict[n]
L.append(n)
for m in n.outbound_nodes:
G[n]['out'].remove(m)
G[m]['in'].remove(n)
if len(G[m]['in']) == 0:
def forward_and_backward(graph):
Performs a forward pass and a backward pass through a list of sorted Nodes.
Arguments:
`graph`: The result of calling `topological_sort`.
for n in graph:
n.forward()
for n in graph[::-1]:
n.backward()
def sgd_update(trainables, learning_rate=1e-2):
Updates the value of each trainable with SGD.
Arguments:
`trainables`: A list of `Input` Nodes representing weights/biases.
`learning_rate`: The learning rate.
for t in trainables:
t.value = t.value - learning_rate * t.gradients[t]
import numpy as np
from sklearn.utils import resample
np.random.seed(0)
w1_0 = np.array([[ 0.1, 0.2, 0.3, 0.4],
[ 0.5, 0.6, 0.7, 0.8],
[ 0.9, 1.0, 1.1, 1.2]])
w2_0 = np.array([[ 1.3, 1.4],
[ 1.5, 1.6],
[ 1.7, 1.8],
[ 1.9, 2.0]])
b1_0 = np.array( [-2.0, -6.0, -1.0, -7.0])
b2_0 = np.array( [-2.5, -5.0])
X_ = np.array([[1.0, 2.0, 3.0]])
y_ = np.array([[-0.85, 0.75]])
n_features = X_.shape[1]
W1_ = w1_0
b1_ = b1_0
W2_ = w2_0
b2_ = b2_0
X, y = Input(), Input()
W1, b1 = Input(), Input()
W2, b2 = Input(), Input()
l1 = Linear(X, W1, b1)
s1 = Sigmoid(l1)
l2 = Linear(s1, W2, b2)
t1 = Tanh(l2)
cost = MSE(y, t1)
feed_dict = {
X: X_, y: y_,
W1: W1_, b1: b1_,
W2: W2_, b2: b2_
epochs = 10
m = X_.shape[0]
batch_size = 1
steps_per_epoch = m // batch_size
graph = topological_sort(feed_dict)
trainables = [W1, b1, W2, b2]
l_Mat_W1 = [w1_0]
l_Mat_W2 = [w2_0]
l_Mat_out = []
l_val = []
for i in range(epochs):
for j in range(steps_per_epoch):
X_batch, y_batch = resample(X_, y_, n_samples=batch_size)
X.value = X_batch
y.value = y_batch
forward_and_backward(graph)
sgd_update(trainables, 0.1)
loss += graph[-1].value
mat_W1 = []
mat_W2 = []
for i in graph:
if (i.value.shape[0] == 3) and (i.value.shape[1] == 4):
mat_W1 = i.value
if (i.value.shape[0] == 4) and (i.value.shape[1] == 2):
mat_W2 = i.value
l_Mat_W1.append(mat_W1)
l_Mat_W2.append(mat_W2)
l_Mat_out.append(graph[9].value)
来观察一下。当然还有更高级的可视化方法:
import matplotlib.pyplot as plt
%matplotlib inline
fig = plt.figure( figsize=(14,10))
ax0 = fig.add_subplot(131)
#aax0 = fig.add_axes([0, 0, 0.3, 0.1])
c0 = ax0.imshow(np.array(l_Mat_out).reshape([-1,2]).T, interpolation='nearest',aspect='auto', cmap="Reds", vmax=1, vmin=-1)
ax0.set_title("Output")
cbar = fig.colorbar(c0, ticks=[-1, 0, 1])
ax1 = fig.add_subplot(132)
c1 = ax1.imshow(np.array(l_Mat_W1).reshape(len(l_Mat_W1), 12).T, interpolation='nearest',aspect='auto', cmap="Reds")
ax1.set_title("w1")
cbar = fig.colorbar(c1, ticks=[np.min(np.array(l_Mat_W1)), np.max(np.array(l_Mat_W1))])
ax2 = fig.add_subplot(133)
c2 = ax2.imshow(np.array(l_Mat_W2).reshape(len(l_Mat_W2), 8).T, interpolation='nearest',aspect='auto', cmap="Reds")
ax2.set_title("w2")
cbar = fig.colorbar(c2, ticks=[np.min(np.array(l_Mat_W2)), np.max(np.array(l_Mat_W2))])
ax0.set_yticks([0,1])
ax0.set_yticklabels(["out0", "out1"])
ax1.set_xlabel("epochs")
#for i in range(len(l_Mat_W1)):
我们注意到,随着训练轮数 Epoch 不断增多, Output 值从最初的 [0.72, -0.88] 不断接近 y = [-0.85, 0.72], 其背后的原因,是模型参数不断的从初始化的值变化、更新,如图中的 w1 w2 两个矩阵。
好了,最简单的轮子已经造好了。 我们的轮子,实现了 Input Linear Sigmoid Tanh 以及 MSE 这几个模块。 接下来的内容,我们将基于现在最火的轮子 Tensorflow,详细介绍一下更多的模块。
最后,本篇只是造了个最基本的轮子,我们集智的知乎专栏上,有一个系列文章,正在介绍如何在Matlab上手写深度学习框架,传送门: ,欢迎大家围观。
目前腾讯云 GPU 服务器还在内测阶段,暂时没有申请到内测资格的读者也可以使用普通的云服务器运行本讲的代码。但从第三讲开始,我们将逐渐开始使用 Tensorflow 框架分析相关数据,对应的计算量大大增加,必须租用
才可以快速算出结果。服务器的租用方式,以及 Python 编程环境的搭建,我们将以腾讯云 GPU 为例,在接下来的内容中和大家详细介绍。
明天提醒我
我要该,理由是:
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
扫扫下载 App}

我要回帖

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信