![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Tensorflow
qauzy
这个作者很懒,什么都没留下…
展开
-
tf.argmax
tf.argmax(input, axis=None, name=None, dimension=None)Returns the index with the largest value across axis of a tensor.input is a Tensor and axis describes which axis of the input Tensor to reduce acr...原创 2018-07-09 21:09:10 · 162 阅读 · 0 评论 -
tf.reduce_sum
用于在某个维度求和reduce_sum( input_tensor, axis=None, keep_dims=False, name=None, reduction_indices=None)input_tensor:表示输入 axis:表示在那个维度进行sum操作。 keep_dims:表示是否保留原始数据的维度,False相当于执行完后原始数据就会少...原创 2018-07-11 01:03:04 · 905 阅读 · 0 评论 -
CentOS 7出现ImportError: No module named Tkinter
安装python工具tkinter库:sudo yum install python-tools原创 2018-07-18 15:38:41 · 2699 阅读 · 2 评论 -
Tensorflow模型保存和模型使用
1 模型保存TensorFlow提供了一个非常方便的api,tf.train.Saver()来保存和还原一个机器学习模型。程序会生成并保存四个文件:checkpoint 文本文件,记录了模型文件的路径信息列表 mnist-10000.data-00000-of-00001网络权重信息 mnist-10000.index .data和.index这两个文件是二进制文件,保存了模型中的...原创 2018-08-06 21:32:21 · 16790 阅读 · 6 评论 -
【表情识别】数据集处理
数据集采用的是fer2013,该如果不想麻烦自己去官网下载,可以贡献一分( ̄▽ ̄)到https://download.csdn.net/download/idwtwt/10590806fer2013.tar.gz解压之后可以得到fer2013.csv,想了解csv格式请自行百度,该格式文件可以用office表格软件打开可以看到其实就三列——emotion,pixels,Usage...原创 2018-08-12 15:28:27 · 3531 阅读 · 0 评论 -
【表情识别】模型训练(简单的卷积网络)
用了简单的四层卷积网络,效果不是很好,训练了800多伦之后,准确率早已不再增加,约在0.62413,还没有达到其他人的0.65# -*- coding: utf-8 -*-import numpy as npfrom APL import APLUnitfrom keras.layers import Activation,BatchNormalizationfrom keras.m...原创 2018-08-18 15:35:36 · 2526 阅读 · 1 评论 -
【pytorch】Module.parameters()函数实现与网络参数管理
我们知道可以通过Module.parameters()获取网络的参数,那这个是如何实现的呢?我先直接看看函数的代码实现: def parameters(self): r"""Returns an iterator over module parameters. This is typically passed to an optimizer. ...原创 2018-08-30 01:21:37 · 46598 阅读 · 3 评论 -
【pytorch】nn.CrossEntropyLoss()和nn.NLLLoss()的区别
损失函数NLLLoss() 的 输入 是一个对数概率向量和一个目标标签. 它不会为我们计算对数概率,适合最后一层是log_softmax()的网络. 损失函数 CrossEntropyLoss() 与 NLLLoss() 类似, 唯一的不同是它为我们去做 softmax.可以理解为:CrossEntropyLoss()=log_softmax() + NLLLoss() 参考:htt...转载 2018-09-25 16:38:45 · 26964 阅读 · 1 评论