(#########优化器函数########)TensorFlow实现与优化深度神经网络

2023-11-13

反正是要学一些API的,不如直接从例子里面学习怎么使用API,这样同时可以复习一下一些基本的机器学习知识。但是一开始开始和以前一样,先直接讲类和常用函数用法,然后举例子。
这里主要是各种优化器,以及使用。因为大多数机器学习任务就是最小化损失,在损失定义的情况下,后面的工作就交给优化器啦
https://www.tensorflow.org/versions/r0.11/api_docs/python/train.html
从其中讲几个比较常用的,其他的可以自己去看文档。
类:

Optimizer
GradientDescentOptimizer
AdagradOptimizer
AdagradDAOptimizer
MomentumOptimizer
AdamOptimizer
FtrlOptimizer
RMSPropOptimizer

二.常用的optimizer类

Ⅰ.class tf.train.Optimizer

优化器(optimizers)类的基类。这个类定义了在训练模型的时候添加一个操作的API。你基本上不会直接使用这个类,但是你会用到他的子类比如GradientDescentOptimizer, AdagradOptimizer, MomentumOptimizer.等等这些。

这里讲一个大致的使用流程
(可以和后面提供的线性回归例子对比加深理解)

# 代入你需要的参数创建优化器(optimizer),这里以GradientDescentOptimizer类作为例子
opt = GradientDescentOptimizer(learning_rate=0.1)
# 添加操作到图里面通过更新变量(variables)列表来最小化代价。cost是一个tensor,变量列表就是tf.Variable对象列表
opt_op = opt.minimize(cost, var_list=<list of variables>)
  
  
  • 1
  • 2
  • 3
  • 4
  • 1
  • 2
  • 3
  • 4

在训练部分中,你只要run那个更新的操作就行了(比如这里是minimize函数返回的这个opt_op)

# Execute opt_op to do one step of training:
opt_op.run()
  
  
  • 1
  • 2
  • 1
  • 2

以上就是最基本的的使用框架了,思想其实是很简单的

Processing gradients before applying them.

Calling minimize() takes care of both computing the gradients and applying them to the variables. If you want to process the gradients before applying them you can instead use the optimizer in three steps:

Compute the gradients with compute_gradients().
Process the gradients as you wish.
Apply the processed gradients with apply_gradients().
Example:

# Create an optimizer.
opt = GradientDescentOptimizer(learning_rate=0.1)

# Compute the gradients for a list of variables.
grads_and_vars = opt.compute_gradients(loss, <list of variables>)

# grads_and_vars is a list of tuples (gradient, variable).  Do whatever you
# need to the 'gradient' part, for example cap them, etc.
capped_grads_and_vars = [(MyCapper(gv[0]), gv[1]) for gv in grads_and_vars]

# Ask the optimizer to apply the capped gradients.
opt.apply_gradients(capped_grads_and_vars)
  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

重要函数:
tf.train.Optimizer.__init__(use_locking, name)

作用:创建一个新的优化器(optimizer),必须通过子类调用,事实上,我们也不会使用这个。
参数:
use_locking: Bool. If True apply use locks to prevent concurrent updates to variables.
name: A non-empty string. The name to use for accumulators created for the optimizer.

tf.train.Optimizer.minimize(loss, global_step=None, var_list=None, gate_gradients=1, aggregation_method=None, colocate_gradients_with_ops=False, name=None, grad_loss=None)

作用:添加操作通过更新变量列表消化损失(loss).这个函数结合了调用compute_gradients()apply_gradients() 这两个函数,如果你想在应用梯度之前计算出来,那么就调用compute_gradients() 然后再自己显式的使用apply_gradients()
参数:
loss: 待小化的值(类型是tesnor)
global_step: Optional Variable to increment by one after the variables have been updated.
var_list: [可选]待更新小化损失的变量列表。默认是图里面GraphKeys.TRAINABLE_VARIABLES 下的变量的列表。
gate_gradients: How to gate the computation of gradients. Can be GATE_NONE, GATE_OP, or GATE_GRAPH.
aggregation_method: Specifies the method used to combine gradient terms. Valid values are defined in the class AggregationMethod.
colocate_gradients_with_ops: If True, try colocating gradients with the corresponding op.
name: Optional name for the returned operation.
grad_loss: Optional. A Tensor holding the gradient computed for loss.
返回:
An Operation that updates the variables in var_list. If global_step was not None, that operation also increments global_step.
Raises:
ValueError: If some of the variables are not Variable objects.

tf.train.Optimizer.compute_gradients(loss, var_list=None, gate_gradients=1, aggregation_method=None, colocate_gradients_with_ops=False, grad_loss=None)

作用:计算损失函数对于各个变量列表中各个变量的梯度。minimize() 的第一部分就是计算梯度的这个函数。返回的是一个(gradient, variable) 对的列表当然对于某个给定的变量要是没有梯度的话,就是None
参数:
loss: 待小化的值(类型是tesnor)
var_list: [可选]待更新小化损失的变量列表。默认是图里面GraphKeys.TRAINABLE_VARIABLES 下的变量的列表。
gate_gradients: How to gate the computation of gradients. Can be GATE_NONE, GATE_OP, or GATE_GRAPH.
aggregation_method: Specifies the method used to combine gradient terms. Valid values are defined in the class AggregationMethod.
colocate_gradients_with_ops: If True, try colocating gradients with the corresponding op.
grad_loss: Optional. A Tensor holding the gradient computed for loss.

tf.train.Optimizer.apply_gradients(grads_and_vars, global_step=None, name=None)

Apply gradients to variables.This is the second part of minimize(). It returns an Operation that applies gradients.
Args:
grads_and_vars: List of (gradient, variable) pairs as returned by compute_gradients().
global_step: Optional Variable to increment by one after the variables have been updated.
name: Optional name for the returned operation. Default to the name passed to the Optimizer constructor.
Returns:
An Operation that applies the specified gradients. If global_step was not None, that operation also increments global_step.

Gating Gradients

Both minimize() and compute_gradients() accept a gate_gradients argument that controls the degree of parallelism during the application of the gradients.

The possible values are: GATE_NONE, GATE_OP, and GATE_GRAPH.

GATE_NONE: Compute and apply gradients in parallel. This provides the maximum parallelism in execution, at the cost of some non-reproducibility in the results. For example the two gradients of matmul depend on the input values: With GATE_NONE one of the gradients could be applied to one of the inputs before the other gradient is computed resulting in non-reproducible results.

GATE_OP: For each Op, make sure all gradients are computed before they are used. This prevents race conditions for Ops that generate gradients for multiple inputs where the gradients depend on the inputs.

GATE_GRAPH: Make sure all gradients for all variables are computed before any one of them is used. This provides the least parallelism but can be useful if you want to process all gradients before applying any of them.

Slots

Some optimizer subclasses, such as MomentumOptimizer and AdagradOptimizer allocate and manage additional variables associated with the variables to train. These are called Slots. Slots have names and you can ask the optimizer for the names of the slots that it uses. Once you have a slot name you can ask the optimizer for the variable it created to hold the slot value.

This can be useful if you want to log debug a training algorithm, report stats about the slots, etc.

tf.train.Optimizer.get_slot_names()

Return a list of the names of slots created by the Optimizer.

See get_slot().

Returns:

A list of strings.

tf.train.Optimizer.get_slot(var, name)

Return a slot named name created for var by the Optimizer.

Some Optimizer subclasses use additional variables. For example Momentum and Adagrad use variables to accumulate updates. This method gives access to these Variable objects if for some reason you need them.

Use get_slot_names() to get the list of slot names created by the Optimizer.

Args:

var: A variable passed to minimize() or apply_gradients().
name: A string.
Returns:

The Variable for the slot if it was created, None otherwise.

Other Methods

tf.train.Optimizer.get_name()

Ⅱ.class tf.train.GradientDescentOptimizer

这个类是实现梯度下降算法的优化器。

构造函数
tf.train.GradientDescentOptimizer.__init__(learning_rate, use_locking=False, name=’GradientDescent’)

作用:
构造一个新的使用梯度下降算法的优化器(optimizer)

参数:
learning_rate: 一个tensor或者浮点值,表示使用的学习率
use_locking: If True use locks for update operations.
name: 【可选】这个操作的名字,默认是”GradientDescent”

Ⅲ.class tf.train.AdadeltaOptimizer

实现了 Adadelta算法的优化器,可以算是下面的Adagrad算法改进版本

构造函数:
tf.train.AdadeltaOptimizer.init(learning_rate=0.001, rho=0.95, epsilon=1e-08, use_locking=False, name=’Adadelta’)

作用:构造一个使用Adadelta算法的优化器
参数:
learning_rate: tensor或者浮点数,学习率
rho: tensor或者浮点数. The decay rate.
epsilon: A Tensor or a floating point value. A constant epsilon used to better conditioning the grad update.
use_locking: If True use locks for update operations.
name: 【可选】这个操作的名字,默认是”Adadelta”

IV.class tf.train.AdagradOptimizer

Optimizer that implements the Adagrad algorithm.

See this paper.
tf.train.AdagradOptimizer.__init__(learning_rate, initial_accumulator_value=0.1, use_locking=False, name=’Adagrad’)

Construct a new Adagrad optimizer.
Args:

learning_rate: A Tensor or a floating point value. The learning rate.
initial_accumulator_value: A floating point value. Starting value for the accumulators, must be positive.
use_locking: If True use locks for update operations.
name: Optional name prefix for the operations created when applying gradients. Defaults to "Adagrad".

Raises:

ValueError: If the initial_accumulator_value is invalid.

The Optimizer base class provides methods to compute gradients for a loss and apply gradients to variables. A collection of subclasses implement classic optimization algorithms such as GradientDescent and Adagrad.

You never instantiate the Optimizer class itself, but instead instantiate one of the subclasses.

Ⅴ.class tf.train.MomentumOptimizer

Optimizer that implements the Momentum algorithm.

tf.train.MomentumOptimizer.__init__(learning_rate, momentum, use_locking=False, name=’Momentum’, use_nesterov=False)

Construct a new Momentum optimizer.

Args:

learning_rate: A Tensor or a floating point value. The learning rate.
momentum: A Tensor or a floating point value. The momentum.
use_locking: If True use locks for update operations.
name: Optional name prefix for the operations created when applying gradients. Defaults to “Momentum”.

Ⅵ.class tf.train.AdamOptimizer

实现了Adam算法的优化器
构造函数:
tf.train.AdamOptimizer.__init__(learning_rate=0.001, beta1=0.9, beta2=0.999, epsilon=1e-08, use_locking=False, name=’Adam’)

Construct a new Adam optimizer.

Initialization:

m_0 <- 0 (Initialize initial 1st moment vector)
v_0 <- 0 (Initialize initial 2nd moment vector)
t <- 0 (Initialize timestep)
The update rule for variable with gradient g uses an optimization described at the end of section2 of the paper:

t <- t + 1
lr_t <- learning_rate * sqrt(1 - beta2^t) / (1 - beta1^t)

m_t <- beta1 * m_{t-1} + (1 - beta1) * g
v_t <- beta2 * v_{t-1} + (1 - beta2) * g * g
variable <- variable - lr_t * m_t / (sqrt(v_t) + epsilon)
The default value of 1e-8 for epsilon might not be a good default in general. For example, when training an Inception network on ImageNet a current good choice is 1.0 or 0.1.

Note that in dense implement of this algorithm, m_t, v_t and variable will update even if g is zero, but in sparse implement, m_t, v_t and variable will not update in iterations g is zero.

Args:

learning_rate: A Tensor or a floating point value. The learning rate.
beta1: A float value or a constant float tensor. The exponential decay rate for the 1st moment estimates.
beta2: A float value or a constant float tensor. The exponential decay rate for the 2nd moment estimates.
epsilon: A small constant for numerical stability.
use_locking: If True use locks for update operations.
name: Optional name for the operations created when applying gradients. Defaults to “Adam”.

三.函数

四.例子

I.线性回归

要是有不知道线性回归的理论知识的,请到
http://blog.csdn.net/xierhacker/article/details/53257748
http://blog.csdn.net/xierhacker/article/details/53261008
熟悉的直接跳过。
直接上代码:

from __future__ import print_function,division
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt

# Prepare train data
train_X = np.linspace(-1, 1, 100)
train_Y = 2 * train_X + np.random.randn(*train_X.shape) * 0.33 + 10

# Define the model
X = tf.placeholder("float")
Y = tf.placeholder("float")
w = tf.Variable(0.0, name="weight")
b = tf.Variable(0.0, name="bias")
loss = tf.square(Y - tf.mul(X, w) - b)
train_op = tf.train.GradientDescentOptimizer(0.01).minimize(loss)

# Create session to run
with tf.Session() as sess:
    sess.run(tf.initialize_all_variables())

    epoch = 1
    for i in range(10):
        for (x, y) in zip(train_X, train_Y):
            _, w_value, b_value = sess.run([train_op, w, b],feed_dict={X: x,Y: y})
        print("Epoch: {}, w: {}, b: {}".format(epoch, w_value, b_value))
        epoch += 1


#draw 
plt.plot(train_X,train_Y,"+")
plt.plot(train_X,train_X.dot(w_value)+b_value)
  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32

结果:
这里写图片描述
这里写图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

(#########优化器函数########)TensorFlow实现与优化深度神经网络 的相关文章

  • 图像识别中,目标分割、目标识别、目标检测和目标跟踪这几个方面区别是什么?+资料列表

    目标识别 深度学习进行目标识别的资源列表 转 https zhuanlan zhihu com p 26076489 以下转自 https www zhihu com question 36500536 作者 知乎用户 链接 https w
  • 图解NCHW与NHWC数据格式

    图解NCHW与NHWC数据格式 田海立 CSDN CSDN博客 nchw 流行的深度学习框架中有不同的数据格式 典型的有NCHW和NHWC格式 本文从逻辑表达和物理存储角度用图的方式来理解这两种数据格式 最后以RGB图像为例来加深NHWC和
  • 深度学习网络篇——VGGNet(Part1 网络结构&训练环节)

    我们上篇文章了解了一下NIN 接下来我们来了解一下VGGNet 可以说是另一波的跪舔和膜拜 VGGNet主要是分为两篇文章 第一篇文章来分享一下VGGNet的网络结构还有训练环节 第二篇文章是分享VGGNet做的分类实验和总结 此为第一篇
  • 序列模型——自然语言处理与词嵌入(理论部分)

    1 词汇表征 深度学习已经给自然语言处理 Natural Language Process NLP 带来革命性的变革 其中一个很关键的概念是词嵌入 word embedding 这是语言表示的一种方式 可以让算法自动的了解一些类似的词 例如
  • Pytorch中计算自己模型的FLOPs

    转自 Pytorch中计算自己模型的FLOPs thop profile 方法 yolov5s 网络模型参数量 计算量统计 墨理学AI CSDN博客 Pytorch 用thop计算pytorch模型的FLOPs 简书 安装thop pip
  • 3D人体重建方法漫谈

    转自 https blog csdn net Asimov Liu article details 96442990 1 概述 2 模型匹配的方法 2 1SMPL Skinned Multi Person Linear model 模型 2
  • tiny-cnn执行过程分析(MNIST)

    在http blog csdn net fengbingchun article details 50573841中以MNIST为例对tiny cnn的使用进行了介绍 下面对其执行过程进行分析 支持两种损失函数 1 mean squared
  • word2vector学习笔记(一)

    word2vector学习笔记 一 最近研究了一下google的开源项目word2vector http code google com p word2vec 其实这玩意算是神经网络在文本挖掘的一项成功应用 本文是看了论文 Distribu
  • 图神经网络(1):图卷积神经网络GCN ICLR 2017

    图卷积神经网络GCN ICLR 2017 是曾经在美国加州大学UCI教授 现在荷兰阿姆斯特丹大学教授 Max Welling团队的大作 Max是图灵奖获得者Hinton的弟子 第一作者T N Kipf已经成为这个领域有名的学者和工程师 如果
  • Android平台深度学习--NNAPI

    转自 http blog sina com cn s blog 602f87700102y62v html 1 Android 8 1 API 27 NNAPI 人工智能神经网络API 如 TensorFlow 神经网络 API 能够向设备
  • 朴素贝叶斯分类器简介及C++实现(性别分类)

    贝叶斯分类器是一种基于贝叶斯定理的简单概率分类器 在机器学习中 朴素贝叶斯分类器是一系列以假设特征之间强 朴素 独立下运用贝叶斯定理为基础的简单概率分类器 朴素贝叶斯是文本分类的一种热门 基准 方法 文本分类是以词频为特征判断文件所属类别或
  • MLOps极致细节:4. MLFlow Projects 案例介绍(Gitee代码链接)

    MLOps极致细节 4 MLFlow Projects 案例介绍 Gitee代码链接 MLFlow Projects允许我们将代码及其依赖项打包为一个可以在其他平台上以可复制 reproducible 和可重用 reusable 的方式运行
  • 目标检测基础

    什么是目标检测 简单来说就是 检测图片中物体所在的位置 本文只介绍用深度学习的方法进行目标检测 同过举出几个特性来帮助各位理解目标检测任务 同时建议学习目标检测应先具备物体人工智能算法基础和物体分类现实基础 特性1 Bounding Box
  • Deep Learning Tutorials(一):开头语

    万事开头难 当你开始看这些时候 有可能你已经开始了研究生生活 不在像本科时候过着那种得过且过 考试不挂科的日子 你整天盲目 漫无目的的过日子实际上是在浪费自己的生命 所以坚持每天进步吧 回到正事 你可能开始从事深度学习研究或者有关机器学习方
  • Softmax分类和两层神经网络以及反向传播的代码推导

    发现草稿箱里还有一篇很早之前的学习笔记 希望可以帮助到有需要的童鞋 目录 序 Softmax分类器 反向传播 数据构建以及网络训练 交叉验证参数优化 序 原来都是用的c 学习的传统图像分割算法 主要学习聚类分割 水平集 图割 欢迎一起讨论学
  • LoFTR配置运行: Detector-Free Local Feature Matching with Transformers ubuntu18.04 预训练模型分享

    刚装好系统的空白系统ubuntu18 04安装 首先进入 软件与更新 换到国内源 论文下载 代码下载 1 anaconda 3 5 3 安装 Index of anaconda archive 清华大学开源软件镜像站 Tsinghua Op
  • 决策树(Decision Tree)简介

    决策树 Decision Tree 及其变种是另一类将输入空间分成不同的区域 每个区域有独立参数的算法 决策树分类算法是一种基于实例的归纳学习方法 它能从给定的无序的训练样本中 提炼出树型的分类模型 树中的每个非叶子节点记录了使用哪个特征来
  • 可视化工具Netron介绍

    Netron是一种用于神经网络 深度学习和机器学习模型的可视化工具 它可以为模型的架构生成具有描述性的可视化 descriptive visualization 源码在 https github com lutzroeder netron
  • nvidia深度学习加速库apex简单介绍

    介绍地址 https docs nvidia com deeplearning sdk mixed precision training index html 本人英文水平有限 有误请指正 使用理由 使用精度低于32位浮点的数值格式有许多好
  • 深度学习中的优化算法之AdaGrad

    之前在https blog csdn net fengbingchun article details 123955067 介绍过SGD Mini Batch Gradient Descent MBGD 有时提到SGD的时候 其实指的是MB

随机推荐

  • ubuntu下安装Docker

    ubuntu下安装Docker 注意 由于Docker需要在Linux Kernel 3 8及以上才可以很好的工作 本人在ubuntu12 04 lts 内核3 2也正常安装 官方更是推荐Ubuntu系统 这里有两种选择 Ubuntu 12
  • go语言面试题:简述bitmap的应用场景有哪些

    数据库索引 用来高效地进行数据查询 Web 日志分析 用来统计访问者信息 布隆过滤器 用来判断一个元素是否属于集合 缓存位图 用来高效地实现缓存管理 图像处理 用来表示和操作图像数据
  • 在服务器设置中smtp协议是指什么,outlook中的smtp协议具体是指什么

    outlook中smtp协议是指应用层的服务 可以适用于各种网络系统 outlook是微软办公软件套装的组件之一 它对windows自带的outlook express的功能进行了扩充 学习视频分享 编程视频 详细说明 Microsoft
  • ntp服务器超时无响应,设备从ntpd获取时间,但“ntpq -p”命令正在等待超时

    在我们的代码中 我们使用ntpd从服务器获取时间并设置时间 执行ntpd命令后 我们运行 ntpq p 来检查服务器偏移量 我们在不同的进程中运行ntpd的命令 并在完成ntpq之后运行 设备从ntpd获取时间 但 ntpq p 命令正在等
  • 祝福 Eric 的下一段旅程|Flutter 3.3 现已发布

    Flutter 团队及社区成员们在美丽的城市挪威奥斯陆向您发来问候 我们正在此参加社区举办的 Flutter Vikings 活动 这是一个为期两天的开发技术交流盛会 虽然线下门票已经售罄 但您还可以通过在线方式查看本次会议 本周 我们也有
  • wpf拖拽图片,滚轮放大缩小

    WPF提供了很多函数方便我们处理图片 例如各式各样的Transform类用来移动 缩放和旋转图片 有各式各样的Effect类来修改图片的外观 更难得的是 这些类都可以在XAML代码直接设置 而XAML为了提高代码的可维护性 又为我们提供了R
  • 工作3个月,我的测试工作感悟

    项目感想 经过将近3个月以来的迭代版本的测试 这段时间以来的工作和以前有点不同 迭代版本时间紧 任务重 同时对质量的要求更高 每天的工作时间安排的非常紧 一个星期的任务需要完成这个星期的测试任务 同时回归上个星期的bug 这样的工作流程 我
  • python 实现炸金花小游戏

    python 实现炸金花小游戏 本文章在学习python中进行的练习小游戏 目的是为了让学习者熟悉python中的列表 字典 集合等数据操作 游戏规则 一付扑克牌 去掉大小王 每个玩家发3张牌 最后比大小 看谁赢 有以下几种牌 豹子 三张一
  • JAVA构造器

    构造器是类中的一个特殊的方法 定义时不能加返回值类型 如果加了返回值类型就会变成一个普通的方法 并且方法名和类名相同 构造器的作用是初始化对象 new关键字才是创建对象
  • PAT B1059 C语言竞赛

    这是PAT考试乙级题库1059题的思路 include
  • 前端报错duplicate attribute

    前端报错duplicate attribute 当出现这个错误的时候就预示着同一个属性在一个标签对里面重复出现了两遍 删掉一个就好了
  • 田忌赛马java代码算法,Java贪心算法: 田忌赛马

    import java util Scanner import java util List import java util ArrayList import java util Collections public class Main
  • 时序预测

    时序预测 MATLAB实现ARIMA时间序列预测 GDP预测 目录 时序预测 MATLAB实现ARIMA时间序列预测 GDP预测 预测效果 基本介绍 模型设计 模型分析 学习总结 参考资料 预测效果 基本介绍 GDP是英文Gross Dom
  • AOP失效的原因之一(踩坑)

    背景 项目需求 需要检测其他同事的部分功能 自然想到的切面编程 按照网上的流程 很容易就完成了AOP的触发 但最近突然发现 之前的一个AOP突然就失效了 切面代码 AfterReturning pointcut save returning
  • cesium设置token

    cesium使用需要token 1 登录cesium地址 https ion cesium com 没有账号的自己注册 注册流程 创建成功后 会显示刚创建的信息 然后选中后 右边即可看到token 复制即可使用 代码中使用方式 Cesium
  • 腾讯云COS+PicGo+Typora十分钟搭建自己的图床

    文章目录 一 腾讯云配置 1 购买COS 新人可以1元购相当于白嫖 2 前往对象存储页面创建存储桶 3 在存储桶中创建文件夹 4 回到概览获取基本信息 5 获取用户密钥管理 二 配置PicGo 1 下载安装PicGo 2 配置PicGo 三
  • FCN(全卷积网络)详解

    FCN详解 全卷积网络就是在全连接网络的基础上 通过用卷积网络替换全连接网络得到的 首先看一下什么是全连接网络 以及全连接网络的缺点 通常的CNN网络中 在最后都会有几层全连接网络来融合特征信息 然后再对融合后的特征信息进行softmax分
  • 3个收缩/展开/折叠的js代码

    第一种
  • 心理学的166个现象---之八

    141 同体效应 同体效应也称自己人效应 是指学生把教师归于同一类型的人 是知心朋友 学生对 自己人 的话更信赖 更易于接受 管理心理学中有句名言 如果你想要人们相信你是对的 并按照你的意见行事 那就首先需要人们喜欢你 否则 你的尝试就会失
  • (#########优化器函数########)TensorFlow实现与优化深度神经网络

    反正是要学一些API的 不如直接从例子里面学习怎么使用API 这样同时可以复习一下一些基本的机器学习知识 但是一开始开始和以前一样 先直接讲类和常用函数用法 然后举例子 这里主要是各种优化器 以及使用 因为大多数机器学习任务就是最小化损失