乱七八糟_tensorflow总结

tensorflow中使用tf.ConfigProto()配置Session运行参数&&GPU设备指定

https://blog.csdn.net/dcrmg/article/details/79091941

https://www.tensorflow.org/guide/graphs

JulKeras中自定义复杂的loss函数

https://kexue.fm/archives/4493

 

softmax_cross_entropy_with_logits

 

深度学习基础系列(五)| 深入理解交叉熵函数及其在tensorflow和keras中的实现

https://www.cnblogs.com/hutao722/p/9761387.html

 

TensorFlow 的卷积操作 Python 实现

https://zhuanlan.zhihu.com/p/45309650

TensorFlow 学习系列笔记

https://zhuanlan.zhihu.com/c_145493078

如何在 TensorFlow 中使用多个 Graph

https://zhuanlan.zhihu.com/p/32824604

 

TensorFlow学习(三):Graph和Session

https://blog.csdn.net/xierhacker/article/details/53860379

 

ValueError: Tensor 'A' must be from the same graph as Tensor 'B'

 

tf.contrib.lookup.HashTable

 

Tensorflow——tf.matmul() 和tf.multiply() 的区别

https://www.jianshu.com/p/b6be1cacd94c

 

tf.multiply()

https://blog.csdn.net/m0_37041325/article/details/77036513

 

TensorFlow函数:tf.where

https://blog.csdn.net/A_a_ron/article/details/79048446

 

4、TensorFLow 数学运算

https://blog.csdn.net/mzpmzk/article/details/78636142

一、Tensor 之间的运算规则
相同大小 Tensor 之间的任何算术运算都会将运算应用到元素级
不同大小 Tensor(要求dimension 0 必须相同) 之间的运算叫做广播(broadcasting)
Tensor 与 Scalar(0维 tensor) 间的算术运算会将那个标量值传播到各个元素
Note: TensorFLow 在进行数学运算时,一定要求各个 Tensor 数据类型一致
 

 

2 Tensorflow - 标量运算

https://blog.csdn.net/lukabruce/article/details/81512031

 

keras 自定义 loss损失函数, sample在loss上的加权 和 metric

1. loss是整体网络进行优化的目标, 是需要参与到优化运算,更新权值W的过程的

2. metric只是作为评价网络表现的一种“指标”, 比如accuracy,是为了直观地了解算法的效果,充当view的作用,并不参与到优化过程

1. keras中定义loss,返回的是batch_size长度的tensor, 而不是像tensorflow中那样是一个scalar

2. 为了能够将自定义的loss保存到model, 以及可以之后能够顺利load model, 需要把自定义的loss拷贝到keras.losses.py 源代码文件下,否则运行时找不到相关信息,keras会报错
 

错误Tensor is not an element of this graph tensorflow

https://blog.csdn.net/lujiandong1/article/details/53448012

 

 

softmax_cross_entropy_with_logits中“logits”是个什么意思?

https://zhuanlan.zhihu.com/p/51431626

 

Keras使用的一些细节

https://www.cnblogs.com/ranjiewen/p/8011021.html

 

Keras各种layer的作用及用法--简要总结(不断更新中)

https://www.jianshu.com/p/86d667ee3c62

 

keras 两种训练模型方式fit和fit_generator(节省内存)

https://blog.csdn.net/u011311291/article/details/79900060

 

如何使用Keras fit和fit_generator(动手教程)

https://blog.csdn.net/learning_tortosie/article/details/85243310

https://www.jianshu.com/p/9b77199552fc

 

 

tensorflow载入数据的三种方式

https://blog.csdn.net/lujiandong1/article/details/53376802

 

pBuilding Convolutional Neural Network using NumPy from Scratch

https://towardsdatascience.com/building-convolutional-neural-network-using-numpy-from-scratch-b30aac50e50a

 

手把手带你 Numpy实现CNN

https://zhuanlan.zhihu.com/c_162633442

手把手带你用Numpy实现CNN <零>

https://zhuanlan.zhihu.com/p/33773140

如何自己从零实现一个神经网络?

https://www.zhihu.com/question/314879954/answer/638380202?utm_source=wechat_session&utm_medium=social

 

tensorflow batch_normalization的正确使用姿势

https://blog.csdn.net/computerme/article/details/80836060

BN在如今的CNN结果中已经普遍应用,在tensorflow中可以通过tf.layers.batch_normalization()这个op来使用BN。该op隐藏了对BN的mean var alpha beta参数的显示申明,因此在训练和部署测试中需要特征注意正确使用BN的姿势。

 

 

Keras 自适应Learning Rate (LearningRateScheduler)

https://www.cnblogs.com/jins-note/p/9550826.html

Constant Learning Rate

keras.optimizers.SGD(lr=0.1, momentum=0.0, decay=0.0, nesterov=False)

Time-Based Decay

 the source code of Keras, the SGD optimizer takes decay and lr arguments and update the learning rate by a decreasing factor in each epoch.

lr *= (1. / (1. + self.decay * self.iterations))
learning_rate = 0.1
decay_rate = learning_rate / epochs
momentum = 0.8
sgd = SGD(lr=learning_rate, momentum=momentum, decay=decay_rate, nesterov=False)

Step Decay

The mathematical form of step decay is :

lr = lr0 * drop^floor(epoch / epochs_drop) 
def step_decay(epoch):
   initial_lrate = 0.1
   drop = 0.5
   epochs_drop = 10.0
   lrate = initial_lrate * math.pow(drop,  
           math.floor((1+epoch)/epochs_drop))
   return lrate
lrate = LearningRateScheduler(step_decay)

Exponential Decay

def exp_decay(epoch):
   initial_lrate = 0.1
   k = 0.1
   lrate = initial_lrate * exp(-k*t)
   return lrate
lrate = LearningRateScheduler(exp_decay)

Adaptive Learning Rate Methods

keras.optimizers.Adagrad(lr=0.01, epsilon=1e-08, decay=0.0)
keras.optimizers.Adadelta(lr=1.0, rho=0.95, epsilon=1e-08, decay=0.0)
keras.optimizers.RMSprop(lr=0.001, rho=0.9, epsilon=1e-08, decay=0.0)
keras.optimizers.Adam(lr=0.001, beta_1=0.9, beta_2=0.999, epsilon=1e-08, decay=0.0)

 

[Keras] SGD 随机梯度下降优化器参数设置

https://blog.csdn.net/u012862372/article/details/80319166

 

 

 

How to set class weights for imbalanced classes in Keras?

 

TensorFlow学习(三):tf.scatter_nd函数

https://blog.csdn.net/zlrai5895/article/details/80551056

FancyKeras-数据的输入(花式)

一、生成器-Generator

二、Sequence-序列数据

https://zhuanlan.zhihu.com/p/32679425

 

A detailed example of how to use data generators with Keras

https://stanford.edu/~shervine/blog/keras-how-to-generate-data-on-the-fly

 

keras concatenate函数

 

 

 

 

 

-- 未完待续 --

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值