- 博客(71)
- 资源 (13)
- 收藏
- 关注
原创 win10+tensorflow-gpu(1.12.0)+cuda9.0+cudnn成功配置多台机器
舍友买了几台新笔记本,我们装tensorflow玩玩,实测1060MQ,1060,甚至960显卡都ok第一步:下载安装anaconda3第二步:安装tensorflow-gpu打开anaconda prompt,输入命令pip install tensorflow-gpu -i https://pypi.doubanio.com/simple/第三步:安装cuda9.0下载cu...
2018-11-15 13:01:16
5909
原创 HDU 1094 A+B for input-output practice(6)
problem descriptionYour task is to calculate the sum of some integers.inputInput contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers foll...
2018-09-02 12:02:28
453
原创 HDU 1093 for input-output practice(5)
problem descriptionYour task is to calculate the sum of some integers.inputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M i...
2018-09-02 11:56:08
330
原创 HDU 1092 for input-output practice(4)
problem descriptionYour task is to Calculate the sum of some integers.inputInput contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A...
2018-09-02 11:53:07
245
原创 HDU 1091 for input-output practice(3)
problem descriptionYour task is to Calculate a + b.inputInput contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case contain...
2018-09-02 11:50:23
218
原创 HDU 1090 for input-output practice(2)
problem descriptionYour task is to Calculate a + b.inputInput contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a s...
2018-09-02 11:46:38
174
原创 HDU 1089 for input-output practice(1)
problem descriptionYour task is to Calculate a + b. Too easy?! Of course! I specially designed the problem for acm beginners. You must have found that some problems have the same titles with this...
2018-09-02 11:39:12
175
原创 HDU 1087 super jumping!jumping!jumping!
problem descriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to yo...
2018-09-02 11:36:33
407
原创 HDU 1064 financial management
problem descriptionLarry graduated this year and finally has a job. He’s making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial ...
2018-09-02 11:17:35
203
原创 HDU 1062 text reverse
problem descriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then output them.inputThe input co...
2018-09-02 11:13:41
334
原创 HDU 1060 leftmost digit
解题思路: N^N用科学计数法表示为a*10^x 我们要得到的就是a 以10为底取对数 log10(N^N)=log10(a)+x Nlog10(N)=log10(a)+x log10(a)=Nlog10(N)-x a=10^(Nlog10(N)-x) 而由HDU 1018题(https://blog.youkuaiyun.com/landcruiser007/article/details/...
2018-09-02 11:09:34
199
原创 HDU 1052 tian ji--the horse racing
思路: 首先比较最慢的马。 1.如果田忌最慢的马比齐王最慢的马还慢:那么让田忌最慢的马去和齐王最快的马比。输一次。 2.如果田忌最慢的马比齐王最慢的马快:那么让两个比,胜一次。 3.如果最慢的马一样快:再比较田忌和齐王最快的马。如果田忌最快的马比齐王最快的马快,就让两个最快的马比。胜一次。 如果田忌最快的马比齐王最快的马慢,那么让田忌最慢的马去和齐王最快的马比。输一次。#includ...
2018-09-01 15:46:51
164
原创 HDU 1022 train problem 1(栈)
problem descriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is t...
2018-09-01 15:32:01
207
原创 HDU 1018 big number(求n!的位数)
problem descriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are ...
2018-09-01 15:16:11
197
原创 HDU 1010 tempter of the bone(DFS)
problem descriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He re...
2018-09-01 15:07:46
153
原创 HDU 1009 fatmouse' trade(贪心)
problem descriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The warehouse has N rooms. The i-th room conta...
2018-09-01 15:00:11
214
原创 HDU 1005 number sequence(重点题)
problem descriptionA number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n).inputThe i...
2018-09-01 14:51:16
257
原创 HDU 1004 let the balloon rise
problem descriptioncontest time again! how excited it is to see balloons floating around. but to tell you a secret, the judges’ favourite time is suessing the most popular problem. when the contest ...
2018-09-01 14:10:16
133
原创 HDU 1003 max sum
problem descriptiongiven a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence. for example, given(6,-1,5,4,-7),the max sum in this sequence is 6+(-1)+5+4=14input...
2018-09-01 13:49:25
153
原创 HDU 1001 sum problem
problem descriptionhey, welcome to HDOJ. in this problem, your task is to calculate SUM(n)=1+2+3+…+n.input the input will consist of a series of integers n, one integer per line.outputfor e...
2018-09-01 13:19:34
195
原创 HDU 1000 A+B problem
problem descriptioncalculate A+Binputeach line will contain two integers A and B. process to end of lfileoutputfor each case , output A+B in one linesample input1 1sample outpu...
2018-09-01 13:14:29
221
原创 HDU 2074 叠筐
题目描述: 需要的时候,就把一个个大小差一圈的筐叠上去,使得从上往下看时,边筐花色交错。这个工作现在要让计算机来完成,得看你的了。 输入: 输入是一个个的三元组,分别是,外筐尺寸n(n为满足0< n<80的奇整数),中心花色字符,外筐花色字符,后二者都为ASCII可见字符; 输出: 输出叠在一起的筐图案,中心花色与外筐花色字符从内层起交错相叠,多筐相叠时,最外筐的角总是被打磨...
2018-03-18 20:16:30
540
原创 排版题:输出梯形
题目描述: 输入一个高度h,输出一个高为h,上底边为h的梯形。 输入: 一个整数h(1<=h<=1000) 输出: h对应的梯形。 思路分析: 1.第一行有h个*,高度为h 2.下面一行比上面一行多两个#include<iostream>using namespace std;int main(){ int h; while...
2018-03-18 20:07:18
901
原创 日期差值问题
题目描述: 有两个日期,求两个日期之间的天数,如果 两个日期是连续的我们规定他们之间的天数为两天。 输入: 有多组数据,每组数据有两行,分别表示两个日期,形式为YYYYMMDD。 输出: 每组数据输出一行,即日期差值。 样例输入: 20110412 20110422 样例输出: 11问题分析: 1.基本思想:把原区间问题统一到起点确定的区间问题上去,我们把问题统一为与00...
2018-03-18 20:01:33
639
原创 使用c++头文件algorthm的sort函数进行快速排序
c++的头文件algorithm中有一个神奇的函数:sort,可以进行快速排序。 sort(起始位置,结束位置)即可使用,默认为升序。 那么如果想自定义排序方式呢?如降序,或两个元素某一指标相同时,按另一指标排序。 有两种方法: 1.编写一个函数cmp。排序时调用sort(起始位置,结束位置,cmp),cmp返回值为true时,第一个参数排在第二个参数之前。 如题目: #inclu...
2018-03-18 19:53:20
2682
原创 对输入的n个整数进行排序:冒泡排序c++
对输入的n个整数进行排序。1&lt;=n&lt;=100。 选择冒泡排序,首先要知道冒泡排序的时间复杂度为o(n^2),空间复杂度为o(n)。本题中n最大为100,时间和空间都可以接受。#include&lt;iostream&gt;using namespace std;int main(){ int c[100],n=0; //n为1到100 while(ci...
2018-03-17 21:06:09
22359
原创 tensorflow实现多层感知机
1.载入tensorflow,加载mnist数据集import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datamnist=input_data.read_data_sets("MNIST_data/",one_hot=True)sess=tf.InteractiveSession()...
2018-02-24 15:45:51
293
原创 tensorflow实现AGN自编码器
1.载入tensorflow,MNIST数据集和常用库import numpy as npimport sklearn.preprocessing as prepimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datamnist=input_data.read_data_sets(...
2018-02-24 11:20:06
336
原创 加载MNIST报错:[WinError 10060] 由于连接方在一段时间后没有正确答复解决办法
tensorflow加载mnist数据集,一些书上和博客中的代码如下:from tensorflow.examples.tutorials.mnist import input_datamnist=input_data.read_data_sets("MNIST_data/",one_hot=True)但是,有些时候报错:TimeoutError ...
2018-02-22 14:10:11
16942
6
原创 Tensorflow实现MNIST手写数字识别(Softmax Regression)
1.加载MNIST数据集from tensorflow.examples.tutorials.mnist import input_datamnist=input_data.read_data_sets("MNIST_data/",one_hot=True)注意:此处有可能报一大堆错误,如下:TimeoutError ...
2018-02-22 13:56:35
416
原创 五步搞定win10安装anaconda及tensorflow
1.首先安装anaconda3(推荐清华开源镜像站下载),开始菜单中出现了一个文件夹Anaconda3 2.在文件夹中打开Anaconda Navigator 单击左侧Environments,单击左下角CreateEnvironment name:tensorflow √python python version:一定要选3.53.在文件...
2018-02-20 21:29:48
1118
原创 阿当姆斯方法求解微分方程初值问题:四阶龙格库塔提供出发值(C语言)
#include<stdio.h>float f1(float x,float y) //第一问{ return y*y;//方程}float f2(float x,float y)//第二问{ return 0.1*(x*x*x+y*y);}//四阶龙格库塔提供出发值void runge(float(*f)(float x,float ...
2018-02-12 10:22:54
4226
1
原创 四阶龙格库塔(Runge-Kutta)求微分方程初值(C语言)
#include<stdio.h>//四阶龙格库塔void runge(float(*f)(float x,float y),float a,float b,float y0,int N){ float x=a,y=y0,K1,K2,K3,K4; float h=(b-a)/N; int i; printf("第一问\n"); pr...
2018-02-12 10:21:38
5637
原创 改进欧拉法求解微分方程初值(C语言)
#include<stdio.h>#define N 10void modeuler(float(*f)(float,float),float x0,float y0,float xn,int n){ int i; float yp,yc,x=x0,y=y0,h=(xn-x0)/n; printf("第一问\n"); printf("x[...
2018-02-12 10:20:21
5720
原创 龙贝格算法(Romberg)求定积分(C语言)
#include<stdio.h>#include<math.h>float f1(float x){ return exp(-x*x);}float f2(float x){ return sin(2*cos(x))*sin(x)*sin(x);}float f3(float x){ return sin(x)/sq...
2018-02-12 10:15:59
9977
原创 求超定方程组的最小二乘解(matlab)
A=[2 4 3 -5 10 -12 4 11];b=[10 -13 -26 25];x=zeros(2,1);m=A'*bn=A'*Ax=n\m结果:m = -179 692n = 129 -83 -83 306x = 0.08172.2836
2018-02-12 10:13:15
23524
6
原创 最小二乘法曲线拟合(matlab)
(1)Hu.mfunction a=hu(x,y,m)S = zeros(1,2*m+1);T = zeros(m+1,1);for k = 1:2*m+1 S(k) = sum(x.^(k-1));endfor k = 1:m+1 T(k) = sum(x.^(k-1).*y);endA = zeros(m+1,m+1);a= zeros(m+1,1...
2018-02-12 10:11:39
6843
原创 牛顿插值公式:牛顿前插(C语言)
题目: 算法: #include<stdio.h>#define N 3void difference(float y[],float f[4][4],int n){ int k,i; f[0][0]=y[0]; f[1][0]=y[1]; f[2][0]=y[2]; f[3][0]=y[3]; for(k=1;k&...
2018-02-12 10:08:16
6856
2
原创 拉格朗日(Lagrange)插值法(C语言)
题目 拉格朗日插值法流程图 (1)二次插值:#include<stdio.h>float lagelangri(float x[],float y[],float xx,int n){ int i,j; float *a,yy=0; a=new float[n]; for(i=0;i<=n-1;i++) { ...
2018-02-12 10:04:54
18422
2
原创 雅克比迭代法与高斯塞德尔迭代法求解方程组(C语言)
分别用雅可比 迭代法与高斯塞德尔迭代法解下列方程组: 雅可比迭代法:#include<stdio.h>#include<math.h>#define eps 1e-6#define max 100//雅可比迭代法void jacobi(float *a,int n,float x[]){ int i,j,k=0; float eps...
2018-02-10 10:43:55
19107
西电ACM选修课PPT
2019-04-11
斯坦福机器学习课程笔记
2019-02-28
altera DE0开发板驱动程序(完美解决无法将程序下载到开发板的问题)
2018-02-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人