- 博客(597)
- 收藏
- 关注
转载 CUDA 编程:第一个CUDA程序
# 环境准备Windows 下安装好CUDA,VS2013。创建一个空的控制台程序,新增加一个文件“test.cu”。##配置头文件和库文件目录```C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\includeC:\Program Files\NVIDIA GPU Computing T...
2019-07-03 23:37:00
633
转载 主机向虚拟机拷贝文件
虚拟机终端执行:sudo apt-get autoremove open-vm-toolssudo apt-get install open-vm-toolssudo apt-get install open-vm-tools-desktop转载于:https://www.cnblogs.com/xiaojianliu/p/10196278.html...
2018-12-29 15:35:00
523
转载 ubuntu下安装ffmpeg
sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next sudo apt-get update sudo apt-get install ffmpeg查看是否安装成功:ffmpeg -version转载于:https://www.cnblogs.com/xiaojianliu/p/101...
2018-12-25 17:45:00
334
转载 find: ‘/run/user/1000/gvfs’: Permission denied
linux使用命令 find / -name *** 查找文件的时候会遇到以下报错find: ‘/run/user/1000/gvfs’: Permission denied 其实这个目录是空的,查不查都没关系。所以,以下解决方式比较简直暴umount /run/user/1000/gvfsrm -rf /run/user/1000/gvfs...
2018-12-25 14:39:00
420
转载 LeNet-5
LeNet-5是一种用于手写体字符识别的非常高效的卷积神经网络。原文下载。LeNet-5网络结构LeNet-5共有7层,不包含输入层;网络结构可以描述为:卷积=>下采样=>卷积=>下采样=>卷积=>全连接=>全连接各层参数详解INPUT层-输入层首先是数据 INPUT 层,输入图像的尺寸统一归一化为32*32。...
2018-12-24 22:02:00
139
转载 [rejected] master -> master (fetch first)(non-fast forward)
git push 时候遇到的错误:hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: ‘git pull …’) before p...
2018-12-20 11:40:00
91
转载 error: src refspec master does not match any.
执行下面的命令,git push 时候出错:git push origin master出现如下错误:error: src refspec master does not match any.error: failed to push some refs to 'git@github.com:********'原因:本地仓库为空解决办法:...
2018-12-20 11:35:00
92
转载 dts、dtb编译
设备树(Device Tree)包括DTC(device tree compiler),DTS(device tree source和DTB(device tree blob)。dtc编译器能够把 dts 文件生成为dtb文件,也能把dtb文件生成为dts文件,Jetpack中提供了编译工具dtc,所在的目录为:....64_TX2/Linux_for_Tegra_tx...
2018-12-13 17:16:00
2974
转载 编译内核
准备工作版本:jetpack3.1,R28.1,TX2虚拟机:ubuntu14.04参考文档、编译工具链、源码下载编译主要步骤记载如下:export CROSS_COMPILE=<crossbin>export TEGRA_KERNEL_OUT=<outdir>export ARCH=arm64<crossbin&...
2018-12-13 16:46:00
173
转载 ubuntu 安装Eigen
Eigen官网Eigen是一个高层次的C ++库,有效支持线性代数,矩阵和矢量运算,数值分析及其相关的算法。ubuntu下安装:sudo apt-get install libeigen3-dev默认安装路径/usr/include/eigen3 执行复制命令:cp -r /usr/include/eigen3/Eigen/ /usr...
2018-12-11 23:41:00
153
转载 Ubantu 安装fftw3
FFTW官网FFTW ( the Faster Fourier Transform in the West) 是一个快速计算离散傅里叶变换的标准C语言程序集。ubuntu下安装指令:sudo apt-get install fftw3 fftw3-dev pkg-config转载于:https://www.cnblogs.com/xiaojianliu/p/...
2018-12-11 23:16:00
2905
转载 697. 数组的度
题目pythonclass Solution: def findShortestSubArray(self, nums): """ :type nums: List[int] :rtype: int """ counts = collections.Coun...
2018-12-04 17:11:00
100
转载 605. 种花问题
题目pythonclass Solution: def canPlaceFlowers(self, flowerbed, n): """ :type flowerbed: List[int] :type n: int :rtype: bool """ ...
2018-12-04 16:10:00
80
转载 3.1 最优化
损失函数可视化损失函数一般都是定义在高维度的空间中(比如,在CIFAR-10中一个线性分类器的权重矩阵大小是[10x3073],就有30730个参数),这样要将其可视化就很困难。然而办法还是有的,在1个维度或者2个维度的方向上对高维空间进行切片,就能得到一些直观感受。例如,随机生成一个权重矩阵,该矩阵就与高维空间中的一个点对应。然后沿着某个维度方向前进的同时记录损失函数值的变化。...
2018-11-30 19:35:00
147
转载 717. 1比特与2比特字符
题目pythonclass Solution: def isOneBitCharacter(self, bits): """ :type bits: List[int] :rtype: bool """ i,leng = 0,len(bits) while i...
2018-11-30 09:12:00
77
转载 122. 买卖股票的最佳时机 II
题目pythonclass Solution: def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ profit = 0 for i in ran...
2018-11-29 09:54:00
67
转载 121. 买卖股票的最佳时机
题目pythonclass Solution: def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ if len(prices) < 2: return...
2018-11-29 09:32:00
86
转载 66. 加一
题目python方法一:class Solution: def plusOne(self, digits): """ :type digits: List[int] :rtype: List[int] """ t = 0 for i i...
2018-11-28 22:01:00
87
转载 561. 数组拆分 I
题目pythonclass Solution: def arrayPairSum(self, nums): """ :type nums: List[int] :rtype: int """ nums.sort() return...
2018-11-28 21:05:00
102
转载 219. 存在重复元素 II
题目python方法一:class Solution: def containsNearbyDuplicate(self, nums, k): """ :type nums: List[int] :type k: int :rtype: bool """ ...
2018-11-28 20:47:00
74
转载 217. 存在重复元素
题目python方法一:class Solution: def containsDuplicate(self, nums): """ :type nums: List[int] :rtype: bool """ d = dict() ...
2018-11-28 19:59:00
79
转载 867. 转置矩阵
题目pythonclass Solution: def transpose(self, A): """ :type A: List[List[int]] :rtype: List[List[int]] """ row,col = len(A),len(A[0...
2018-11-28 17:23:00
94
转载 628. 三个数的最大乘积
题目pythonclass Solution: def maximumProduct(self, nums): """ :type nums: List[int] :rtype: int """ nums.sort(reverse = True) ...
2018-11-28 15:58:00
203
转载 566. 重塑矩阵
题目pythonclass Solution: def matrixReshape(self, nums, r, c): """ :type nums: List[List[int]] :type r: int :type c: int :rtype: List[List[in...
2018-11-28 15:30:00
111
转载 LeetCode 刷题
排序算法数组1.两数之和566. 重塑矩阵字符串位运算二分查找双指针链表栈队列堆哈希表树二叉搜索树图深度优先搜索广度优先搜索递归贪心算法回溯算法分治算法数学转载于:https://www.cnblogs.com/xiaojianliu/p/100...
2018-11-28 12:44:00
78
转载 1.两数之和
题目pythonclass Solution: def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ hash_map...
2018-11-28 12:43:00
59
转载 python3 调试
断言凡是用print()来辅助查看的地方,都可以用断言(assert)来替代:def foo(s): n = int(s) assert n != 0, 'n is zero!' return 10 / ndef main(): foo('0')assert的意思是,表达式n != 0应该是True,否则,根据程序运行的...
2018-11-27 20:50:00
68
转载 python3 错误处理
trytry .... except ... elsetry: your operations ......................except ExceptionI: If there is ExceptionI, then execute this block.except ExceptionII: If there is ...
2018-11-27 20:43:00
81
转载 python3 面向对象:实例属性和类属性
由于Python是动态语言,根据类创建的实例可以任意绑定属性。给实例绑定属性的方法是通过实例变量,或者通过self变量:class Student(object): def __init__(self, name): self.name = names = Student('Bob')s.score = 90但是,如果Stude...
2018-11-27 17:43:00
77
转载 python3 面向对象:继承
在OOP程序设计中,当我们定义一个class的时候,可以从某个现有的class继承,新的class称为子类(Subclass),而被继承的class称为基类、父类或超类(Base class、Super class)。继承可以把父类的所有功能都直接拿过来,这样就不必重零做起,子类只需要新增自己特有的方法,也可以把父类不适合的方法覆盖重写。例如:class Animal(o...
2018-11-27 17:30:00
107
转载 python3 面向对象:访问限制
在Class内部,可以有属性和方法,而外部代码可以通过直接调用实例变量的方法来操作数据,这样,就隐藏了内部的复杂逻辑。如果要让内部属性不被外部访问,可以把属性的名称前加上两个下划线__,在Python中,实例的变量名如果以__开头,就变成了一个私有变量(private),只有内部可以访问,外部不能访问。class Student(object): def ...
2018-11-27 17:20:00
142
转载 python3 面向对象:类和实例
面向对象简介面向过程的程序设计把计算机程序视为一系列的命令集合,即一组函数的顺序执行。为了简化程序设计,面向过程把函数继续切分为子函数,即把大块函数通过切割成小块函数来降低系统的复杂度。面向对象编程——Object Oriented Programming,简称OOP,是一种程序设计思想。OOP把对象作为程序的基本单元,一个对象包含了数据和操作数据的函数。而面向对象的程序设计...
2018-11-27 16:47:00
238
转载 python3 IO编程:序列化
序列化在程序运行的过程中,所有的变量都是在内存中,可以随时修改变量,但是一旦程序结束,变量所占用的内存就被操作系统全部回收。我们把变量从内存中变成可存储或传输的过程称之为序列化,在Python中叫pickling,在其他语言中也被称之为serialization,marshalling,flattening等等,都是一个意思。序列化之后,就可以把序列化后的内容写入磁盘,或者通过网络传...
2018-11-27 16:16:00
93
转载 python3 IO编程:操作文件和目录
操作文件和目录的函数一部分放在os模块中,一部分放在os.path模块中。查看当前目录的绝对路径:import osimport os.pathdir = os.path.abspath('.')print(dir)创建一个目录:os.mkdir()删除一个目录:os.rmdir()os.path.join()把两个路径合成一个时...
2018-11-27 16:00:00
84
转载 python3 IO编程:文件读写
打开文件对象在磁盘上读写文件的功能都是由操作系统提供的,现代操作系统不允许普通的程序直接操作磁盘,所以,读写文件就是请求操作系统打开一个文件对象(通常称为文件描述符),然后,通过操作系统提供的接口从这个文件对象中读取数据(读文件),或者把数据写入这个文件对象(写文件)。打开一个文件对象,使用Python内置的open()函数,传入文件名和标示符:file object ...
2018-11-27 15:30:00
147
转载 python3 模块
模块在Python中,一个.py文件就称之为一个模块(Module)。模块是一组Python代码的集合,可以使用其他模块,也可以被其他模块使用。import语句可以通过在其他Python源文件中执行import语句来将任何Python源文件用作模块。import module1[, module2[,... moduleN]当解释器遇到 import 语句...
2018-11-27 14:33:00
82
转载 python3 函数:偏函数
偏函数在Python的functools模块众多的功能中,其中有一个就是偏函数,我们称之为 partial function。当函数的参数个数太多,需要简化时,使用functools.partial可以创建一个新的函数,这个新函数可以固定住原函数的部分参数,从而在调用时更简单。int()函数可以把字符串转换为整数,当仅传入字符串时,int()函数默认按十进制转换:pr...
2018-11-27 12:02:00
158
转载 python3 函数:函数装饰器
装饰器python装饰器本质上就是一个函数,它可以让其他函数在不需要做任何代码变动的前提下增加额外的功能,装饰器的返回值也是一个函数对象(函数的指针)。实质: 是一个函数。参数:是你要装饰的函数名(并非函数调用)。返回:是装饰完的函数名(也非函数调用)。作用:为已经存在的对象添加额外的功能。特点:不需要对对象做任何的代码上的变动。python装饰器有很...
2018-11-27 12:00:00
109
转载 python3 函数:嵌套函数、闭包
嵌套函数与非局部变量在函数中定义另一个函数称为嵌套函数。嵌套函数可以访问包围范围内的变量。def print_msg(msg): def printer(): print(msg) printer()print_msg("Hello") #Hellononlocal关键字使用nonlocal关键字可以修改外层...
2018-11-27 11:27:00
222
转载 python3 函数:filter、sorted
filterfilter()函数用于过滤序列。filter()接收一个函数和一个序列。filter()把传入的函数依次作用于每个元素,然后根据返回值是True还是False决定保留还是丢弃该元素。filter()函数返回的是一个Iterator,也就是一个惰性序列,所以要强迫filter()完成计算结果,需要用list()函数获得所有结果并返回list。返回序列中的奇数:...
2018-11-27 10:41:00
85
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人