目录 第二课第三周:TensorFlow Introduction Introduction to TensorFlow 1 - Packages 1.1 - Checking TensorFlow Version 2 - Basic Optimization with GradientTape 2.1 - Linear Function Exercise 1 - linear_function 2.2 - Computing the Sigmoid Exercise 2 - sigmoid 2…
现代深度学习系统中(比如MXNet, TensorFlow等)都用到了一种技术——自动微分.在此之前,机器学习社区中很少发挥这个利器,一般都是用Backpropagation进行梯度求解,然后进行SGD等进行优化更新.手动实现过backprop算法的同学应该可以体会到其中的复杂性和易错性,一个好的框架应该可以很好地将这部分难点隐藏于用户视角,而自动微分技术恰好可以优雅解决这个问题.接下来我们将一起学习这个优雅的技术:-).本文主要来源于陈天奇在华盛顿任教的课程CSE599G1: Deep Lea…
参考:https://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html#sphx-glr-beginner-blitz-autograd-tutorial-py AUTOGRAD: AUTOMATIC DIFFERENTIATION PyTorch中所有神经网络的核心是autograd包.让我们先简单地看一下这个,然后我们来训练我们的第一个神经网络.autograd包为张量上的所有操作提供自动微分.它是一个按运行定义的框架,这…
Datasets and Estimators are two key TensorFlow features you should use: Datasets: The best practice way of creating input pipelines (that is, reading data into your program). Estimators: A high-level way to create TensorFlow models. Estimators includ…
%matplotlib inline Autograd: 自动求导机制 PyTorch 中所有神经网络的核心是 autograd 包. 我们先简单介绍一下这个包,然后训练第一个简单的神经网络. autograd包为张量上的所有操作提供了自动求导. 它是一个在运行时定义的框架,这意味着反向传播是根据你的代码来确定如何运行,并且每次迭代可以是不同的. 示例 张量(Tensor) torch.Tensor是这个包的核心类.如果设置 .requires_grad 为 True,那么将会追踪所有对于该张量…
训练神经网络时,最常用的算法就是反向传播.在该算法中,参数(模型权重)会根据损失函数关于对应参数的梯度进行调整. 为了计算这些梯度,PyTorch内置了名为 torch.autograd 的微分引擎.它支持任意计算图的自动梯度计算. 一个最简单的单层神经网络,输入 x,参数 w 和 b,某个损失函数.它可以用PyTorch这样定义: import torch x = torch.ones(5) # input tensor y = torch.zeros(3) # expected output…
新手入门完整教程进阶指南 API中文手册精华文章TF社区 INTRODUCTION 1. 新手入门 1.1. 介绍 1.2. 下载及安装 1.3. 基本用法 2. 完整教程 2.1. 总览 2.2. MNIST 数据下载 2.3. MNIST 入门 2.4. MNIST 进阶 2.5. TENSORFLOW 运作方式入门 2.6. 卷积神经网络 2.7. 字词的向量表示 2.8. 递归神经网络 2.9. 曼德布洛特(MANDELBROT)集合 2.10. 偏微分方程 3. 进阶指南 3.1. 总…
Effective TensorFlow Table of Contents TensorFlow Basics Understanding static and dynamic shapes Scopes and when to use them Broadcasting the good and the ugly Feeding data to TensorFlow Take advantage of the overloaded operators Understanding order…
转自:https://www.qcloud.com/community/article/598765?fromSource=gwzcw.117333.117333.117333 这是<使用腾讯云 GPU 学习深度学习>系列文章的第二篇,主要介绍了 Tensorflow 的原理,以及如何用最简单的Python代码进行功能实现.本系列文章主要介绍如何使用 腾讯云GPU服务器 进行深度学习运算,前面主要介绍原理部分,后期则以实践为主. 往期内容: 使用腾讯云 GPU 学习深度学习系列之一:传统机器学…
Lecture note 5: word2vec + manage experiments Word2vec Most of you are probably already familiar with word embedding and understand the importance of a model like word2vec. For those who aren't, Stanford CS 224N's lecture on word vectors is a great r…