
Python
chezhai
不想说
展开
-
install numpy
先下载适合你电脑的numpy安装文件。本人是python3.4版本,32位windows系统,所以下载的是这个:numpy-1.11.2-cp34-none-win32.whl (md5, pgp) 下载地址见下图 下载好后将文件放到python安装目录下的scripts文件夹中。如果python安装正确的话这个文件夹中应该还有pip和easy_in转载 2017-03-03 15:41:05 · 3363 阅读 · 0 评论 -
cv2.VideoCapture()打不开视频
ubuntu16.04 默认安装的Python版本2.7.12,当用pip install opencv-python 安装了opencv for python 3.3.0.10后,运行命令python -c "import cv2;cap=cv2.VideoCapture(0);print(cv2.isOpened())"输出为false经过各种百度,安装其他包文件也没有解决问题。索性回头运行命...转载 2017-12-02 10:28:27 · 8095 阅读 · 4 评论 -
tf.nn.bias_add
import tensorflow as tf a = tf.constant([1.0, 2.0]) c = tf.constant([[1., 3., 4.], [2.0, 5., 6,]]) with tf.Session() as sess: b = tf.nn.relu(a) print(sess.run(b)) print(s原创 2017-07-21 10:44:32 · 1735 阅读 · 0 评论 -
Python 搜索路径
当我们试图加载一个模块时,Python会在指定的路径下搜索对应的.py文件,如果找不到,就会报错: 默认情况下,Python解释器会搜索当前目录、所有已安装的内置模块和第三方模块,搜索路径存放在sys模块的path变量中: 如果我们要添加自己的搜索目录,有两种方法: 一是直接修改sys.path,添加要搜索的目录: 这种方法是转载 2017-03-12 17:46:44 · 591 阅读 · 0 评论