摘要: 解题的思路,数组中除了两个不同的元素外其余都两两相等,考虑到若是数组中只有一单独元素不同可以用异或值求解,那么就可以将该数组分成各包含一个单独元素两个数组。 如何划分数组呢?先对数组整体异或,得到两个单独数的异或值,之后,用这个值作为标志来筛选出后一个单独元素的位置,元素位置确定后就可以分成两个各包 阅读全文
posted @ 2020-04-28 10:05 runsdeep 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 使用依次相加,记录进位的方式进行运算,下面是我的解答,leetcode上运行耗时20ms,内存占用7.3MB struct ListNode{ int val; struct ListNode *next; }; struct ListNode* addTwoNumbers(struct ListN 阅读全文
posted @ 2020-04-27 14:44 runsdeep 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 在分类预测算法中,我们往往有以下四种情况: 1. 正确预测成错误(FPR,假阴性率) 2. 正确预测成正确(TPR,真阳性率) 3. 错误预测成正确(FNR,假阴性率) 4. 错误预测成错误(TNR,真阴性率) 我们对其中的TPR和FPR较为关注,每次计算都能够计算出来这两个值。如果说我们得预测算法 阅读全文
posted @ 2020-02-24 11:44 runsdeep 阅读(944) 评论(0) 推荐(0) 编辑
摘要: 原文链接:https://blog.csdn.net/zhaojc1995/article/details/80572098 讲解的很优秀的一篇RNN原理剖析,讲解了RNN的结构,数学形式,求解等方面,适合初学者入门 阅读全文
posted @ 2020-01-30 10:11 runsdeep 阅读(131) 评论(0) 推荐(0) 编辑
摘要: import lib needed¶ In [1]: from PIL import Image import numpy as np import matplotlib.pyplot as plt import re from glob import glob begin, load data¶ 阅读全文
posted @ 2019-10-07 16:42 runsdeep 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 深度学习中softmax交叉熵损失函数的理解 2018-08-11 23:49:43 lilong117194 阅读数 5198更多 分类专栏: Deep learning 深度学习中softmax交叉熵损失函数的理解 2018-08-11 23:49:43 lilong117194 阅读数 519 阅读全文
posted @ 2019-10-06 21:02 runsdeep 阅读(636) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://segmentfault.com/a/1190000010039529?utm_source=tag-newest softmax函数将任意n维的实值向量转换为取值范围在(0,1)之间的n维实值向量,并且总和为1。 例如:向量softmax([1.0, 2.0, 3.0]) 阅读全文
posted @ 2019-10-05 20:09 runsdeep 阅读(1269) 评论(0) 推荐(0) 编辑
摘要: multiclassification 阅读全文
posted @ 2019-09-18 15:01 runsdeep 阅读(568) 评论(0) 推荐(0) 编辑
摘要: binaryclassification #change the value the element for idx,class_name in enumerate(sorted(list(set(y)))): y[y==class_name]=idx 阅读全文
posted @ 2019-09-18 14:58 runsdeep 阅读(404) 评论(0) 推荐(0) 编辑
摘要: #DATASET: https://archive.ics.uci.edu/ml/datasets/Computer+Hardwareimport numpy as np import matplotlib.pyplot as plt import pandas as pd import sklea 阅读全文
posted @ 2019-09-18 14:49 runsdeep 阅读(367) 评论(0) 推荐(0) 编辑