DeeplabV3+ 训练自己的遥感数据
摘要:一、预处理数据部分 1、创建 tfrecord(修改 deeplab\ dateasets\ build_data.py) 模型本身是把一张张 jpg 和 png 格式图片读到一个 Example 里,写入 tfrecord。但我是一个大的 tif 文件,需要把几万像素的图片分割成小块写入到一个 t
阅读全文
DeeplabV3+ 在自己环境下跑出现的错误
摘要:1、 no module named 'deeplab' 解决办法:把 models/research 和 models/research/slim 加到环境变量path中不管用,需要在 cmd 中运行以下命令后解决,cmd 要先 cd 到 research目录: SET PYTHONPATH=%c
阅读全文
安装TensorFlow踩的坑
摘要:1、TensorFlow的版本要和对应的cuda,cudnn版本都对应上,装了cuda 9.0和cudnn 7.5,TensorFlow默认装了最新版1.13.1,一直出现 DLL error: 找不到指定模块。装了各种VS2015、2017都没用,最后发现是TensorFlow版本太高,需要cud
阅读全文
剑指offer——包含min函数的栈
摘要:定义栈的数据结构,请在该类型中实现一个能够得到栈中所含最小元素的min函数(时间复杂度应为O(1))。 思路:用一个辅助栈记录入栈元素从大到小,如果后面压入的元素比辅助栈顶元素大,就不用压入它(等于还是要,否则pop了会出错)。考虑635入栈,第一次s1:6,s2:6,min:6。第二次s1:6,3
阅读全文
剑指offer——链表中倒数第k个结点
摘要:输入一个链表,输出该链表中倒数第k个结点。 分析:用两个指针来判断,两个指针差k个位置,当后面一个指针到尾部时,前面那个就在倒数第k个位置。还要注意判断k大于链表长度的情况。
阅读全文
剑指offer——矩形覆盖
摘要:我们可以用2*1的小矩形横着或者竖着去覆盖更大的矩形。请问用n个2*1的小矩形无重叠地覆盖一个2*n的大矩形,总共有多少种方法? 分析:斐波那契数列的变形 n=0,返回0 n=1,返回1 n=2,返回1 n>2,两种情况第一块横着放,返回f(n-1),竖着放返回f(n-2) 所以就是一个典型斐波那契
阅读全文
剑指offer——变态跳台阶
摘要:一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级。求该青蛙跳上一个n级的台阶总共有多少种跳法。 分析: 两种方法,第一种比较直观,第二种比较直接。 第一种:f(1)=1; f(2)=f(2-1)+f(2-2)=2; f(3)=f(3-1)+f(3-2)+f(3-3); f(n) =
阅读全文
PAT A1095 Cars on Campus (30 分)——排序,时序,从头遍历会超时
摘要:Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the g
阅读全文
PAT A1094 The Largest Generation (25 分)——树的bfs遍历
摘要:A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generation. Your task is to find t
阅读全文
PAT A1055 The World's Richest (25 分)——排序
摘要:Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to si
阅读全文
PAT A1052 Linked List Sorting (25 分)——链表,排序
摘要:A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key
阅读全文
PAT A1076 Forwards on Weibo (30 分)——图的bfs
摘要:Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social n
阅读全文
PAT A1075 PAT Judge (25 分)——结构体初始化,排序
摘要:The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist
阅读全文
PAT A1074 Reversing Linked List (25 分)——链表,vector,stl里的reverse
摘要:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6,
阅读全文
PAT A1073 Scientific Notation (20 分)——字符串转数字
摘要:Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-
阅读全文
PAT A1111 Online Map (30 分)——最短路径,dijkstra
摘要:Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is t
阅读全文