1.softmax函数的优化来防止溢出

2.np.argmax()函数的使用

返回值为数组中最大值的索引

 a = [1, 2, 3, 4, 3, 7]
 print(np.argmax(a))
 

若np.argmax()中的参数为矩阵,则需要添加axis参数

e.g.

 a = [[12, 2, 3], [9, 14, 7]]

 # 显示每一行(横向)的最大值的索引
 print(np.argmax(a, axis=1))
 # output: [0 1]

 # 显示每一列(纵向)的最大值的索引
 print(np.argmax(a, axis=0))
 # output: [0 1 1]

Depp Learning note Day1的更多相关文章

  1. Learning note for Binding and validation

    Summary of my learning note for WPF Binding Binding to DataSet. when we want to add new record, we s ...

  2. Learning Note: SQL Server VS Oracle–Database architecture

     http://www.sqlpanda.com/2013/07/learning-note-sql-server-vs.html This is my learning note base on t ...

  3. Course Machine Learning Note

    Machine Learning Note Introduction Introduction What is Machine Learning? Two definitions of Machine ...

  4. shell learning note

      shell learning note MAIN="/usr/local/" # 变量大写 STATUS="$MAIN/status" # 美元符加字符串是 ...

  5. 2014/09/30 Learning Note

    Vbird Linux: Vim Learning: http://linux.vbird.org/linux_basic/0310vi.php Bash Shell: http://linux.vb ...

  6. [Angular2] @Ngrx/store and @Ngrx/effects learning note

    Just sharing the learning experience related to @ngrx/store and @ngrx/effects. In my personal opinio ...

  7. Machine Learning Note Phase 1( Done!)

    Machine Learning 这是第一份机器学习笔记,创建于2019年7月26日,完成于2019年8月2日. 该笔记包括如下部分: 引言(Introduction) 单变量线性回归(Linear ...

  8. Inheritance Learning Note

    好几天没来学习了,昨晚把继承的又整理了一下.想把整理后的东西发到hexo博客上来,却发现命令行又失效了.前几天明明是好的,这几天又没有进行任何操作,网上搜了一下也没有招到合适的解决办法,无奈只能重装了 ...

  9. Machine Learning Note

    [Andrew Ng NIPS2016演讲]<Nuts and Bolts of Applying Deep Learning (Andrew Ng) 中文详解:https://mp.weixi ...

随机推荐

  1. nodejs fs path

    内容详见我的gitHub: https://github.com/shangyueyue/ssy-utils/tree/master/src/nodejs/fs

  2. Python Face Detect Offline

    python版本 3.7.0  1. 安装 cmake pip install cmake  2.安装 boost pip install boost  3.安装 dlib pip install d ...

  3. [ffmpeg] 解码API

    版本迭代 ffmpeg解码API经过了好几个版本的迭代,上一个版本的API是 解码视频:avcodec_decode_video2 解码音频:avcodec_decode_audio4 我们现在能看到 ...

  4. bean属性复制到另外一个bean

    import org.springframework.beans.BeanUtils; BeanUtils.copyProperties(maker.getBaseInfo(), newBasInfo ...

  5. ios端阻止页面滚动露底

    转自 http://www.eboy.me/archives/129: 在IOS端的微信中使用H5页面,页面滑动到底部时,再向上拉或页面在顶部时下拉,总会露出微信自带的底色:总是会让人不爽. 以下是一 ...

  6. SNOI 2019 字符串

    SNOI 2019 字符串 题目 题解: 解法一: 记一个数组\(f\),\(f[i]=\min_j\ s[j]\neq s[j+1] (j\geq i)\),直接sort即可,复杂度\(O(nlog ...

  7. Ticwatch2_3G版省电优化

    设置 --> 网络与连接 --> 云消息同步(禁用) 设置 --> 声音与震动 --> 铃声与音量(静音) 设置 --> 声音与震动 --> 闹钟音量(静音) 设置 ...

  8. Windows系统CredSSP漏洞修复

    Windows系统凭证安全支持提供商协议 (CredSSP) 中存在一个严重漏洞,影响所有 Windows 版本,可导致远程攻击者利用 RDP 和 WinRAW 窃取数据并运行恶意代码. 详见:htt ...

  9. python: c_char_p指向的bitmap图像数据,通过c_char_Array最终赋值给PIL的Image对象

    def GetCurrentImage(self): ok, bitmap, buff_len = self.GetCurrentFrameBitmap() #调用C函数,返回位图数据的指针. bit ...

  10. maven的安装教程

    一.准备工作  1.确定电脑上已经成功安装jdk7.0以上版本                 2.win10操作系统                 3.maven安装包            下载 ...