上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotate 阅读全文
posted @ 2018-07-06 00:51 hopskin1 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Implement a MapSum class with insert, and sum methods. For the method insert, you'll be given a pair of (string, integer). The string represents the k 阅读全文
posted @ 2018-07-06 00:25 hopskin1 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 找规律 1,2,... , n 乱序排列,相邻数据的绝对差最多有n-1种 比如1,2,3,4,5对应于 1 5 2 4 3 python代码 python 代码 答案 Approach #2: Construction [Accepted] Intuition When k = n-1, a val 阅读全文
posted @ 2018-07-05 08:19 hopskin1 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 动态规划 空间复杂度 min(O(m),O(n)) python 代码 阅读全文
posted @ 2018-07-04 23:54 hopskin1 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Vamei大神的博客 http://www.cnblogs.com/vamei/ 阅读全文
posted @ 2017-06-16 15:24 hopskin1 阅读(105) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import torch from torch.autograd import Variable dtype = torch.FloatTensor # dtype = torch.cuda.FloatTensor # Uncomment this to run on GPU # N is batch size; D_in is input d... 阅读全文
posted @ 2017-06-11 15:14 hopskin1 阅读(852) 评论(0) 推荐(0) 编辑
摘要: [1]中的程序可以改成如下对应的Tensor形式: 有两个函数需要说明 h.clamp(min=0) clamp表示夹紧,夹住的意思,torch.clamp(input,min,max,out=None)-> Tensor 将input中的元素限制在[min,max]范围内并返回一个Tensor 用 阅读全文
posted @ 2017-06-11 11:47 hopskin1 阅读(8535) 评论(0) 推荐(0) 编辑
摘要: torch的第一个例子程序,是用numpy函数实现神经网络。cs231n的课程中有大量这样的作业。 这是一个三层的神经网络,包括一个输入层,一个中间隐藏层和一个输出层,神经元数分别为Din, H和Dout 前向传播时,H=XW1, H=max(H,0), Y=HW2 反向传播时,按如下公式计算梯度: 阅读全文
posted @ 2017-06-11 10:37 hopskin1 阅读(2592) 评论(0) 推荐(0) 编辑
摘要: 理解C++中的头文件和源文件的作用 http://blog.csdn.net/yue34257667/article/details/45500811 阅读全文
posted @ 2017-02-10 18:38 hopskin1 阅读(126) 评论(0) 推荐(0) 编辑
摘要: [编程题] 字符编码 请设计一个算法,给一个字符串进行二进制编码,使得编码后字符串的长度最短。 输入描述: 每组数据一行,为待编码的字符串。保证字符串长度小于等于1000。 输出描述: 一行输出最短的编码后长度。 输入例子: MT-TECH-TEAM 输出例子: 33 #include <cstdi 阅读全文
posted @ 2016-08-07 17:29 hopskin1 阅读(783) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页