摘要: 先说一说双向循环链表的逆置,网上搜了一箩筐,用VS2017,基本上不成功,尽管明白道理是怎么回事,但是总感觉,不像c++的类,感觉用起来还得传指针啊,传链表啊等参数,不太像双向循环链表类的专属函数。虽然c语言写出来双向循环链表最好,但是既然学了c++,就尽量用一下c++的特点,能用多少是多少,也有利 阅读全文
posted @ 2020-04-17 17:47 yg_staring 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 循环链表,顺便也附上链表的迭代器 1 #include <iostream> 2 3 using namespace std; 4 5 template<class T> class List; 6 template<class T> class ListIterator; 7 8 template 阅读全文
posted @ 2020-03-14 19:50 yg_staring 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 通过数组建立队列 1 #include <iostream> 2 3 using namespace std; 4 5 template<class T> 6 class MyQueue 7 { 8 public: 9 MyQueue(int queuecapacity=10); 10 ~MyQue 阅读全文
posted @ 2020-03-14 19:46 yg_staring 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 通过数组建立栈 1 #include <iostream> 2 3 using namespace std; 4 5 template<class T> 6 int ChangeSize1D(T *a, const int oldSize, const int newSize ) 7 { 8 if( 阅读全文
posted @ 2020-03-14 19:44 yg_staring 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 不使用循环,采用头尾指针,不带有头结点,我这里只是简易的输出,并没有写专用的迭代器。 1 #include <iostream> 2 3 using namespace std; 4 5 template<class T> class MyList; 6 7 template<class T> 8 阅读全文
posted @ 2020-03-14 19:39 yg_staring 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 使用邻接表建立图,直接使用了c++已经写好的list 1 #include <iostream> 2 #include <list> 3 4 using namespace std; 5 6 class Vertex 7 { 8 public: 9 char Label; 10 Vertex(cha 阅读全文
posted @ 2020-03-14 19:36 yg_staring 阅读(184) 评论(0) 推荐(0) 编辑
摘要: DFS使用c++中的stack,BFS使用c++中的queue 1 #include <iostream> 2 #define MAX_VERTS 20 3 #include <stack> 4 #include <queue> 5 6 using namespace std; 7 8 class 阅读全文
posted @ 2020-03-14 19:33 yg_staring 阅读(580) 评论(0) 推荐(0) 编辑
摘要: TensorFlow扩展功能 自动求导、子图的执行、计算图控制流、队列/容器 1.TensorFlow自动求导 在深度学习乃至机器学习中,计算损失函数的梯度是最基本的需求,因此TensorFlow也原生支持自动求导。 比如,一个tensor C,在计算图中有一组依赖的tensor{Xk},那么在Te 阅读全文
posted @ 2019-12-21 20:06 yg_staring 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 1.Caffe Caffe是一个清晰而高效的深度学习框架,也是一个被广泛使用的开源深度学习框架,在Tensorflow出现之前一直是深度学习领域Github star最多的项目。主要优势为:上手容易,网络结构都是以配置文件形式定义,不需要用代码设计网络。训练速度快,组件模块化,可以方便的拓展到新的模 阅读全文
posted @ 2019-12-05 20:34 yg_staring 阅读(1071) 评论(0) 推荐(0) 编辑
摘要: Policy Gradient 初始学习李宏毅讲的强化学习,听台湾的口音真是费了九牛二虎之力,后来看到有热心博客整理的很细致,于是转载来看,当作笔记留待复习用,原文链接在文末。看完笔记再去听一听李宏毅老师的视频,就可以听懂个大概了。当然了还有莫凡的强化学习更具实战性,听莫凡的课基本上可以带我们入门。 阅读全文
posted @ 2019-12-04 20:37 yg_staring 阅读(4301) 评论(0) 推荐(1) 编辑