https://www.tensorflow.org/api_docs/python/tf/random_normal numpy的random库也有normal函数,功能类似,参数排列次序不同: https://docs.scipy.org/doc/numpy-1.13.0/reference/g ...
分类:
其他好文 时间:
2018-03-31 10:55:23
阅读次数:
120
python3.5安装TensorFlow pip install tensorflow 安装numpy,scipy,theano,keras(深度学习框架) 这里很简单 直接命令行输入: python -m pip install numpy python -m pip install scipy ...
分类:
其他好文 时间:
2018-03-29 15:59:34
阅读次数:
126
1.numpy.nonzero(condition),返回参数condition(为数组或者矩阵)中非0元素的索引所形成的ndarray数组,同时也可以返回condition中布尔值为True的值索引,其中,数值0为False,其余的都为True。 其中np.nonzero((b.A>2)*(b.A ...
分类:
编程语言 时间:
2018-03-29 14:50:56
阅读次数:
126
使用 TensorFlow, 你必须明白 TensorFlow: 使用图 (graph) 来表示计算任务. 在被称之为 会话 (Session) 的上下文 (context) 中执行图. 使用 tensor 表示数据. 通过 变量 (Variable) 维护状态. 使用 feed 和 fetch 可 ...
分类:
其他好文 时间:
2018-03-20 18:18:23
阅读次数:
183
Python3 Linux安装(Redhat): 下载Python-3.6.4.tgz: https://www.python.org/downloads/release/python-364/ Yum 安装依赖包 (每个机器有所不同) yum install openssl-devel bzip2 ...
分类:
编程语言 时间:
2018-03-18 18:43:14
阅读次数:
715
#coding:utf-8 from scipy.stats import binom import matplotlib.pyplot as plt import numpy as np #样本数目 n = 200 #发生的概率 p = 0.01 #发生的次数 k = np.arange(0,15... ...
分类:
其他好文 时间:
2018-03-14 19:06:53
阅读次数:
193
OpenCV中的轮廓 OpenCV中的轮廓 1.1什么是轮廓轮廓可以简单认为成连续的点(连着边界)连在一起的曲线,具有相同的颜色或者灰度。轮廓在形状分析和物体的检测和识别中很有用。 为了准确,要使用二值化图像。需要进行阀值化处理或者Canny边界检测。 查找轮廓的函数会修改原始图像。如果之后想继续使 ...
分类:
编程语言 时间:
2018-03-12 18:35:17
阅读次数:
864
打开终端,输入命令: 1.sudo apt-get update (更新源) 2.sudo apt-get install python-pip (安装pip,安装完成输入pip,出现使用方法则安装成功) 3.sudo pip install numpy (使用pip安装相关的包) sudo pip ...
分类:
编程语言 时间:
2018-03-08 17:19:44
阅读次数:
787
结果: [ 0 1 2 3 4 5 6 7 8 9 10 11][ 0. 0.08333333 0.16666667 0.25 0.33333333 0.41666667 0.5 0.58333333 0.66666667 0.75 0.83333333 0.91666667][ 0.9596216 ...
分类:
编程语言 时间:
2018-03-04 19:04:53
阅读次数:
432
#-*- coding: utf-8 -*- ''' numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None) 在指定的间隔内返回均匀间隔的数字。 返回num个均匀分布的样本,在[start, stop... ...
分类:
编程语言 时间:
2018-03-04 19:02:59
阅读次数:
383