- 博客(85)
- 资源 (17)
- 收藏
- 关注
原创 pytorch损失函数整理总结
公式:https://blog.csdn.net/lonely_dark_horse/article/details/73800427公式以及案例:https://blog.csdn.net/zhangxb35/article/details/72464152官方文档:https://pytorch.org/docs/stable/nn.html...
2019-01-31 13:26:38 3407
原创 leetcode-70. Climbing Stairs 爬楼梯
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Note: Given n will be ...
2019-01-28 22:00:29 210
原创 leetcode-75. Sort Colors 颜色分类
Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use...
2019-01-28 21:58:12 268
原创 leetcode-213. House Robber II 打家劫舍 II
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house...
2019-01-27 14:18:53 189
原创 198. House Robber 打家劫舍
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent h...
2019-01-27 13:41:01 249
原创 leetcode-337. House Robber III 打家劫舍 III
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a ...
2019-01-27 13:23:25 263
原创 leetcode-64. Minimum Path Sum 最小路径和
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move either down or rig...
2019-01-26 23:10:40 224
原创 leetcode-122. Best Time to Buy and Sell Stock II 买卖股票的最佳时机 II
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e.,...
2019-01-26 22:40:54 137
原创 leetcode-121. Best Time to Buy and Sell Stock 买卖股票的最佳时机
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the ...
2019-01-26 22:34:45 153
原创 leetcode-226. Invert Binary Tree 翻转二叉树
Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \1 3 6 9 Output: 4 / \ 7 2 / \ / \9 6 3 1 Trivia: This problem wa...
2019-01-26 22:24:52 187
原创 leetcode-114. Flatten Binary Tree to Linked List 二叉树展开为链表
Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \3 4 6 The flattened tree should look like: 1...
2019-01-26 22:02:47 158
原创 python list插入删除,dict插入删除
列表插入:append 在最后加入insert(,) 在第几个位置插入xxxlist1.extend(list2) 将list1和list2连起来 删除pop() 删除最后一个元素remove() 指定要删除的 元素del xxx[下标] 按照下标删除 字典插入:dict[key]=value 删除...
2019-01-26 15:46:52 2015
原创 python实现字符串转浮点型,str2float
DIGITS={'0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9}def str2float(s): s=s.split('.') if s[0]==0: return 0+reduce(lambda x,y:x/10+y , map(lambda x:DIGITS[x],s[1][::-1]...
2019-01-26 11:03:57 2031
原创 leetcode-106. Construct Binary Tree from Inorder and Postorder Traversal 从中序与后序遍历序列构造二叉树
Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given inorder = [9,3,15,20,7...
2019-01-25 13:47:50 137
原创 leetcode-105. Construct Binary Tree from Preorder and Inorder Traversal 从前序与中序遍历序列构造二叉树
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given preorder = [3,9,20,15,7...
2019-01-25 13:22:37 183 1
原创 leetcode-103. Binary Tree Zigzag Level Order Traversal 二叉树的锯齿形层次遍历
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between). For example: Given ...
2019-01-25 12:52:51 215 1
原创 leetcode-104. Maximum Depth of Binary Tree 二叉树的最大深度
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Note: A leaf is a node with ...
2019-01-25 12:37:40 157
原创 leetcode-102. Binary Tree Level Order Traversal 二叉树的层次遍历
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree [3,9,20,null,null,15,7], 3 ...
2019-01-24 14:42:09 214 1
原创 leetcode-100. Same Tree 相同的树
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value....
2019-01-24 14:03:18 175
原创 leetcode-101. Symmetric Tree 对称二叉树
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 / \ 2 2 / \ / \3 ...
2019-01-24 13:55:45 129
原创 leetcode-96. Unique Binary Search Trees 不同的二叉搜索树
Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Input: 3Output: 5Explanation:Given n = 3, there are a total of 5 unique BST's: ...
2019-01-24 12:29:29 171 4
原创 leetcode-94. Binary Tree Inorder Traversal 二叉树的中序遍历
Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3Output: [1,3,2] Follow up: Recursive solution is tri...
2019-01-24 11:40:58 191
原创 leetcode-98. Validate Binary Search Tree 验证二叉搜索树
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's ...
2019-01-24 11:20:22 211
原创 leetcode-236. Lowest Common Ancestor of a Binary Tree 二叉树的最近公共祖先
Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two n...
2019-01-21 16:47:43 156
原创 leetcode-235. Lowest Common Ancestor of a Binary Search Tree 二叉搜索树的最近公共祖先
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined b...
2019-01-21 15:22:00 192
原创 leetcode-234. Palindrome Linked List 回文链表
Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2Output: false Example 2: Input: 1->2->2->1Output: true Follow up: Could yo...
2019-01-21 14:54:49 167
原创 leetcode-206. Reverse Linked List 反转链表,链表逆置
Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULL Follow up: A linked list can be reversed either iterat...
2019-01-21 14:13:01 238
转载 语义分割技巧:纯工程tricks
转自:https://www.zhihu.com/question/272988870/answer/562262315作者:AlexL知乎问题:有关语义分割的奇技淫巧有哪些?AlexL的回答:代码取自在Kaggle论坛上看到的帖子和个人做过的project 1. 如何去优化IoU在分割中我们有时会去用intersection over union去衡量模型的表现,具体定义...
2019-01-21 13:48:25 6379 3
原创 python目标检测给图画框,bbox画到图上并保存
import osimport xml.dom.minidomimport cv2 as cvImgPath = 'C:/Users/49691/Desktop/gangjin/gangjin_test/JPEGImages/'AnnoPath = 'C:/Users/49691/Desktop/gangjin/gangjin_test/Annotations/' #xml文件地址...
2019-01-19 23:14:32 21765 13
原创 python修改xml文件内容
import xml.etree.ElementTree as ETdef change_xml(xml_path): filelist = os.listdir(xml_path) print(filelist) # 打开xml文档 for xmlfile in filelist: doc = ET.parse(xml_path+xmlfile...
2019-01-19 23:12:11 10005
转载 segmentation语义分割数据增强方法及代码
# -*- coding:utf-8 -*-"""数据增强 1. 翻转变换 flip 2. 随机修剪 random crop 3. 色彩抖动 color jittering 4. 平移变换 shift 5. 尺度变换 scale 6. 对比度变换 contrast 7. 噪声扰动 noise 8. 旋转变换/反射变换 Rotation/refle...
2019-01-19 20:50:35 11290 4
原创 leetcode-160. Intersection of Two Linked Lists 两个链表的交叉节点
Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: begin to intersect at node c1. Exam...
2019-01-18 22:36:10 183
原创 leetcode-148. Sort List 链表排序
Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3Output: 1->2->3->4 Example 2: Input: -1->5->3->4-&...
2019-01-18 22:12:05 209
原创 leetcode-142. Linked List Cycle II 环形链表 II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the given linked list, we use an integer pos which represents the positi...
2019-01-18 21:46:51 158
原创 leetcode-141. Linked List Cycle 环形链表
Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexed) in the linked list where ...
2019-01-18 20:44:11 175
原创 leetcode-61. Rotate List 旋转链表
Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Input: 1->2->3->4->5->NULL, k = 2Output: 4->5->1->2->3->N...
2019-01-18 20:27:43 188
原创 leetcode-63. Unique Paths II 不同路径2
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach...
2019-01-16 23:46:43 226
原创 leetcode-62. Unique Paths 不同路径
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach...
2019-01-16 23:32:03 176
OpenCV 3.x with Python By Example 2nd .txt
2019-06-01
OpenCV-3-x-with-Python-By-Example-master.zip
2019-05-31
传智播客python课件
2019-01-26
强化学习Reinforcement learning:An introduction第二版
2018-10-16
斯坦福cs234强化学习ppt教程reinforcement learning
2018-10-10
迁移学习教程,Transfer learning介绍,TL调查
2018-10-08
深度学习优化算法大全
2018-10-08
Deep Learning for Computer Vision by Dr. Stephen Moore
2018-09-18
Deep Learning for Computer Vision with Python123
2018-09-18
Hands On Machine Learning with Scikit-Learn and TensorFlow20173
2018-07-03
David Silver强化学习课件ppt
2018-07-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人