04 2018 档案
摘要:ResNet, AlexNet, VGG, Inception: 理解各种各样的CNN架构 本文翻译自ResNet, AlexNet, VGG, Inception: Understanding various architectures of Convolutional Networks,原作者保
阅读全文
摘要:from:https://blog.csdn.net/davincil/article/details/76598474 from:https://blog.csdn.net/davincil/article/details/76598474 首先放出原始图像: 1、图像的翻转 import ten
阅读全文
摘要:from:https://blog.csdn.net/uestc_c2_403/article/details/72703097 tensorflow内部含有实现图像翻转的函数为 tf.image.flip_up_down:从上向下翻转 tf.image.flip_left_right:从左到又翻转
阅读全文
摘要:100个汉字,放在data目录下。直接将下述文件和data存在同一个目录下运行即可。 关键参数: run_mode = "train" 训练模型用,修改为validation 表示验证100张图片的预测精度,修改为inference表示预测 './data/00098/102544.png'这个图片
阅读全文
摘要:tflearn 中文汉字识别,训练后模型存为pb给TensorFlow使用。 数据目录在data,data下放了汉字识别图片: data$ ls0 1 10 11 12 13 14 15 16 2 3 4 5 6 7 8 9 datag$ ls 0xxx.png yyy.png ....代码: 如果
阅读全文
摘要:from: https://blog.csdn.net/chaipp0607/article/details/73029923 TensorFlow提供了几类图像处理函数,下面介绍图像的编码与解码,图像尺寸调整。 编码与解码 图像解码与编码:一张RGB三通道的彩色图像可以看成一个三维矩阵,矩阵中的不
阅读全文
摘要:迁移学习算法之TrAdaBoost from: https://blog.csdn.net/Augster/article/details/53039489 TradaBoost算法由来已久,具体算法可以参考作者的原始文章,Boosting For Transfer Learning。 1.问题定义
阅读全文
摘要:数据不够怎么训练深度学习模型?不妨试试迁移学习 本质就是这个图!pretrained model就是你截取的部分神经网络模型(迁移学习),而nanonet就是你自己加入的网络层。 随着深度学习技术在机器翻译、策略游戏和自动驾驶等领域的广泛应用和流行,阻碍该技术进一步推广的一个普遍性难题也日渐凸显:训
阅读全文
摘要:基于深度学习和迁移学习的识花实践(转) 深度学习是人工智能领域近年来最火热的话题之一,但是对于个人来说,以往想要玩转深度学习除了要具备高超的编程技巧,还需要有海量的数据和强劲的硬件。不过 TensorFlow 和 Keras 等框架的出现大大降低了编程的复杂度,而迁移学习的思想也允许我们利用现有的模
阅读全文
摘要:以上示例都是人类的迁移学习的能力。 迁移学习是什么? 所谓迁移学习,或者领域适应Domain Adaptation,一般就是要将从源领域(Source Domain)学习到的东西应用到目标领域(Target Domain)上去。源领域和目标领域之间往往有gap/domain discrepancy(
阅读全文
摘要:转自:https://www.zhihu.com/question/41979241/answer/247421889 1. 前言 迁移学习(Transfer Learning,TL)对于人类来说,就是掌握举一反三的学习能力。比如我们学会骑自行车后,学骑摩托车就很简单了;在学会打羽毛球之后,再学打网
阅读全文
摘要:转自:http://blog.csdn.net/cywosp/article/details/38017027 在上一篇文章(http://blog.csdn.net/cywosp/article/details/38014581)中讲到了使用HTTP重定向来实现服务器的负载均衡,本文则讲解另一种实
阅读全文
摘要:Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->
阅读全文
摘要:Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Inpu
阅读全文
摘要: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 symmet
阅读全文
摘要:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit
阅读全文
摘要:Lust for victory will not give you the victory. You must receive the victory from your opponent. He has no choice but to give it to you because he wil
阅读全文
摘要:Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop / recursion? 其他: Method 1
阅读全文
摘要:Given an integer, write a function to determine if it is a power of two.
阅读全文
摘要:Mirai变种中的DGA 分享到: 分享到: 分享到: 发布时间:2016-12-12 16:02:57 作者:360网络安全研究院 投稿方式:发送邮件至linwei#360.cn,或登陆网页版在线投稿 那个导致美国断网的Mirai 又出现带DGA变种,内置了域名生成算法。 连续导致美国和德国断网事
阅读全文
摘要:def qsort(arr, start, end): if start > end: return def partition(arr, start, end): pivot = arr[start] i = start+1 while i start: arr[start], arr[end] ...
阅读全文
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar
阅读全文
摘要:We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra
阅读全文
摘要:Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: Example 1: Example 2:
阅读全文
摘要:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example:
阅读全文
摘要: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 cl
阅读全文
摘要:Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: stack 迭代解法: BFS:(和dfs st
阅读全文
摘要:Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one character at a time by other wo
阅读全文
摘要:from:https://www.cnblogs.com/justinh/p/7716421.html Trie,又经常叫前缀树,字典树等等。它有很多变种,如后缀树,Radix Tree/Trie,PATRICIA tree,以及bitwise版本的crit-bit tree。当然很多名字的意义其实
阅读全文
摘要:features = sc.parallelize(data_group[idx]).map(lambda x: (x.host_ip+'^'+x.domain, 1)).reduceByKey(operator.add).map(get_domain_features) def get_domai
阅读全文
摘要:http://bdsmdvdtube.com/
阅读全文
摘要:Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege
阅读全文
摘要:解决方案 1、利用vi编辑器打开 /etc/bash.bashrc文件(需要root权限) sudo vi /etc/bash.bashrc 2、找到文件中的下列代码 #enable bash completion in interactive shells #if ! shopt -oq posi
阅读全文
摘要:Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node.
阅读全文
摘要:发现自己写python的空格split还挺多坎的,尤其是最后一个是空格的情形:
阅读全文
摘要:Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This
阅读全文
摘要:In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as
阅读全文
摘要:Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For
阅读全文
摘要:Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray). Example 1: Input: [1,3,5,4,7] Output: 3
阅读全文
摘要: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
阅读全文
摘要:On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y
阅读全文
摘要:Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there ar
阅读全文
摘要:Given an integer, return its base 7 string representation. Example 1: Input: 100 Output: "202" Example 2: Input: -7 Output: "-10" Note: The input will
阅读全文
摘要:Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each eleme
阅读全文
摘要:Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d
阅读全文
摘要:Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list t
阅读全文
摘要:You are given a string representing an attendance record for a student. The record only contains the following three characters: A student could be re
阅读全文
摘要:Given an integer array, find three numbers whose product is maximum and output the maximum product. Example 1: Example 2: Note: 这个题目本质上是一个数学题,需要细心观察才可
阅读全文
摘要:结果: [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]] 本质上是递归降维求解。 组合问题C(n, m)降维为C(n-1,m-1),而第一位可以: 选择1, 不选择1选择2, 不选择1不选择2选择3。。。。 if choose 1: xxx else:
阅读全文
摘要:| 类循环排列 # tree DFS def loop_permutation(arr, depth, path, result): if depth == len(arr): result.append(list(path)) return for n in arr: path.append(n)
阅读全文
摘要:最近在做dns tunnel检测,发现了一堆类似这样的域名:c-6rtwjumjzx7877x24uwjkjwjshjx78x2eywzx78yjx2ehtr.g00.medicinenet.com 都是以g00为子域名,前面一堆随机字符!专门查了下: 从 https://www.reddit.co
阅读全文
摘要:A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents
阅读全文
摘要:Apriori算法与实例 R. Agrawal 和 R. Srikant于1994年在文献【2】中提出了Apriori算法,该算法的描述如下: 下面是一个具体的例子,最开始数据库里有4条交易,{A、C、D},{B、C、E},{A、B、C、E},{B、E},使用min_support=2作为支持度阈值
阅读全文
摘要:涉及到tree的题目无非是遍历,三种遍历你要非常熟悉,本题目是后序遍历,你自己在头脑中自底向上模拟tree的遍历就知道怎么求解了!这个题目是谷歌面试遇到的,,,不过它要求的是找出所有的路径! 也可以在迭代每一个node的时候,记录下其diameter,ans就是所有node diameter最大值:
阅读全文
摘要:Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Example 2 Note: Your a
阅读全文
摘要:DBSCAN方法及应用 1.DBSCAN密度聚类简介 DBSCAN 算法是一种基于密度的聚类算法: 1.聚类的时候不需要预先指定簇的个数 2.最终的簇的个数不确定DBSCAN算法将数据点分为三类: 1.核心点:在半径Eps内含有超过MinPts数目的点。 2.边界点:在半径Eps内点的数量小于Min
阅读全文
摘要:Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray scale of each cell becomes the ave
阅读全文
摘要:>>> a=[[0]*3 for i in range(3)]>>> a[[0, 0, 0], [0, 0, 0], [0, 0, 0]]>>> a[1][1]=121>>> a[[0, 0, 0], [0, 121, 0], [0, 0, 0]]>>> a[0][0]=11>>> a[[11, 0
阅读全文
摘要:Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h
阅读全文
摘要:参数解释: (1)iterable指定要排序的list或者iterable,不用多说; (2)cmp为函数,指定排序时进行比较的函数,可以指定一个函数或者lambda函数,如: students为类对象的list,没个成员有三个域,用sorted进行比较时可以自己定cmp函数,例如这里要通过比较第三
阅读全文
摘要:Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between i and j equals
阅读全文
摘要:Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements. Your t
阅读全文
摘要:Reverse a singly linked list. click to show more hints. 精简下代码: 递归解: dfs 记得程序员面试金典里专门提过!
阅读全文
摘要:Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Sil
阅读全文
摘要:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr
阅读全文