
python
wyx100
热爱生活,喜欢编程,结交朋友
展开
-
Python基础Selenium和Chrome教程
浏览器和驱动对应关系附chromedriver与chrome的对应关系表:chromedriver版本 支持的Chrome版本 v2.43 v69-71 v2.42 v68-70 v2.41 v67-69 v2.40 v66-68 v2.39 v66-68 v2.38 v65-67 v2.37 v64-66...原创 2019-12-22 12:19:29 · 690 阅读 · 0 评论 -
windows下使用pycharm配置python2.7的virtualenv环境
1.下载python2.7https://www.python.org/download/releases/2.7/如果安装其他python版本,下载对应python版本。2.创建环境(python2.7运行)https://blog.csdn.net/hy245120020/article/details/50776197 参考:https://www.cnblogs...原创 2018-08-08 09:37:55 · 1824 阅读 · 0 评论 -
keras\preprocessing目录文件详解5.2(sequence.py)-keras学习笔记五
功能:用于预处理序列(例如一篇文章,句子)数据的实用工具。keras-master\keras\preprocessing\sequence.py建立词向量嵌入层,把输入文本转为可以进一步处理的数据格式(例如,矩阵)Keras开发包文件目录Keras实例文件目录代码注释# -*- coding: utf-8 -*-"""Utilities for preprocessi...原创 2018-08-07 18:55:04 · 3233 阅读 · 0 评论 -
keras\preprocessing目录文件详解5.1(image.py)-keras学习笔记五
用于图像数据的实时数据增强的(相当)基本的工具集。功能:生成图片样本(旋转、平移、缩放等),增加训练的数据样本keras-master\keras\preprocessing\image.py建立词向量嵌入层,把输入文本转为可以进一步处理的数据格式(例如,矩阵)Keras开发包文件目录Keras实例文件目录代码注释"""Fairly basic set of to...原创 2018-08-06 18:33:39 · 10630 阅读 · 7 评论 -
时间差计算实例python代码(减法,返回时间差年月日时分秒格式)
基于python3.6.3python3教程python日期时间教程1python日期时间教程2import datetimedef subtime(date1,date2): date1=datetime.datetime.strptime(date1,"%Y-%m-%d %H:%M:%S") date2=datetime.datetime.strptime...原创 2018-07-25 10:59:30 · 6891 阅读 · 0 评论 -
keras\preprocessing目录文件详解5.3(text.py)-keras学习笔记五
该文件用于NLP中词向量处理keras\preprocessing\text.py建立词向量嵌入层,把输入文本转为可以进一步处理的数据格式(例如,矩阵)Keras开发包文件目录Keras实例文件目录代码注释# -*- coding: utf-8 -*-"""Utilities for text input preprocessing.用于文本输入预处理的实用工具。"...原创 2018-07-18 12:46:19 · 1224 阅读 · 0 评论 -
python函数
Python format函数详解Python的zip函数 zip函数接受任意多个(包括0个和1个)序列作为参数,返回一个tuple列表。python 中 np.sum()函数Python的np.prod函数详解python split()函数详解Python的map()函数 详解python的numpy.prod函数运行实例详解python的numpy.reshape函数运行实例详解...原创 2018-07-11 13:18:24 · 1030 阅读 · 0 评论 -
python的numpy.prod函数运行实例详解
官网numpy.prod 数据乘法原创 2018-07-11 12:48:40 · 16280 阅读 · 0 评论 -
python的numpy.reshape函数运行实例详解
官网incompatible shape for a non-contiguous arraynumpy.reshapenumpy.reshape(a, newshape, order='C')[source]Gives a new shape to an array without changing its data. 在不改变其数据的情况下,为数组提供新的形状(数据不变,形状改变)。Para...原创 2018-07-11 12:42:14 · 6225 阅读 · 0 评论 -
官网实例详解4.29(mnist_net2net.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童...原创 2018-07-01 23:04:42 · 242 阅读 · 0 评论 -
官网实例详解4.37(pretrained_word_embeddings.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童...原创 2018-06-29 17:42:41 · 2146 阅读 · 0 评论 -
官网实例详解4.33(mnist_tfrecord.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童...原创 2018-06-29 16:26:27 · 4070 阅读 · 0 评论 -
官网实例详解4.26(mnist_hierarchical_rnn.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童...原创 2018-06-28 00:34:51 · 975 阅读 · 0 评论 -
官网实例详解4.16(imdb_fasttext.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童...原创 2018-06-27 21:01:54 · 1107 阅读 · 0 评论 -
官网实例详解4.21(lstm_text_generation.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童...原创 2018-06-26 22:13:37 · 1172 阅读 · 1 评论 -
官网实例详解4.15(imdb_cnn_lstm.py)-keras学习笔记四
Keras实例目录代码注释'''Train a recurrent convolutional network on the IMDB sentimentclassification task.为IMDB(数据集)情感分类任务训练循环卷积网络Gets to 0.8498 test accuracy after 2 epochs. 41s/epoch on K520 GPU.2个周期后0.8...原创 2018-06-26 10:59:02 · 1256 阅读 · 2 评论 -
官网实例详解4.13(imdb_bidirectional_lstm.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童鞋...原创 2018-06-26 10:22:34 · 2001 阅读 · 0 评论 -
官网实例详解4.11(deep_dream.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童鞋...原创 2018-06-25 20:18:44 · 1076 阅读 · 2 评论 -
官网实例详解4.10(conv_lstm.py)-keras学习笔记四
卷积LSTM网络示例 Keras开发包文件目录Keras实例目录代码注释""" This script demonstrates the use of a convolutional LSTM network.# 卷积LSTM网络示例This network is used to predict the next frame of an artificiallyge...原创 2018-06-24 20:44:35 · 4087 阅读 · 3 评论 -
官网实例详解4.10(conv_lstm.py)-keras学习笔记四
Keras实例目录代码注释 代码执行 Keras详细介绍英文:https://keras.io/中文:http://keras-cn.readthedocs.io/en/latest/实例下载https://github.com/keras-team/kerashttps://github.com/keras-team/keras/tree/master/examples完整项目下载方便没积分童鞋...原创 2018-06-24 09:58:35 · 2363 阅读 · 1 评论 -
官网实例详解4.8(cifar10_resnet.py)-keras学习笔记四
基于CIFAR10(小批量图片)数据集训练ResNet(残差网络)Keras实例目录代码注释"""Trains a ResNet on the CIFAR10 dataset.基于CIFAR10(小批量图片)数据集训练ResNet(残差网络)ResNet v1[a] Deep Residual Learning for Image Recognition残差学习在图像识别中的应用http...原创 2018-06-23 22:19:54 · 1621 阅读 · 0 评论 -
官网实例详解4.7(cifar10_cnn_tfaugment2d.py)-keras学习笔记四
基于CIFAR10(小批量图片)数据集训练简单的深度卷积神经网络本例比较扩大数据(样本)集的两种方法:ImageGenerator 和 AugmentLayerKeras实例目录代码注释'''Train a simple deep CNN on the CIFAR10 small images dataset.基于CIFAR10(小批量图片)数据集训练简单的深度卷积神经网络本例比较增加数据集的...原创 2018-06-12 20:34:51 · 717 阅读 · 0 评论 -
官网实例详解4.28(mnist_mlp.py)-keras学习笔记四
基于MINIST数据集训练简单的深度多层感知机Keras实例目录代码注释'''Trains a simple deep NN on the MNIST dataset.基于MINIST数据集训练简单的深度多层感知机Gets to 98.40% test accuracy after 20 epochs(there is *a lot* of margin for parameter tuni...原创 2018-06-11 15:49:25 · 1080 阅读 · 0 评论 -
官网实例详解4.14(imdb_cnn.py)-keras学习笔记四
基于IMDB(Internet Movie Database,互联网电影数据库)使用一维度卷积文本分类Keras开发包文件目录Keras实例文件目录数据集下载 imdb.npz(网络问题官网下载不了,可用)IMDB详解关于IMDB,-------Internet Movie Database(互联网电影数据库) 推荐https://blog.csdn.net/zubin00...原创 2018-06-11 12:12:30 · 2081 阅读 · 0 评论 -
官网实例详解-目录和实例简介-keras学习笔记四
https://github.com/keras-team/keras/tree/master/examplesKeras examples directoryKeras实例目录 (点击跳转) 官网实例详解4.1(addition_rnn.py)官网实例详解4.2(antirectifier.py)官网实例详解4.3(babi_memnn.py)官网实例详解4.4(ba...原创 2018-06-11 10:36:18 · 9292 阅读 · 0 评论 -
lambda、for和np.random.randint实例解释
f = lambda: int(''.join(np.random.choice(list('0123456789')) for i in range(np.random.randint(1, DIGITS + 1))))f 是一个函数;lambda表示一个表达式,定义了一个匿名函数,函数主体是int(''.join(np.random.choice(list('01...原创 2018-06-10 18:24:24 · 1071 阅读 · 0 评论 -
np.random.choice用法中文和样例详解
官方介绍http://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.random.choice.htmlhttps://docs.python.org/3/library/random.htmlnp.random.choiceRandomState.choice(a, size=None, replace=True, p=None)a...原创 2018-06-10 11:28:58 · 14747 阅读 · 0 评论 -
官网实例详解4.5(cifar10_cnn.py)-keras学习笔记四
基于CIFAR10(小批量图片)数据集训练简单的深度卷积神经网络名词解释PCA 与 ZCA详解Keras ImageDataGenerator参数详解代码注释'''Train a simple deep CNN on the CIFAR10 small images dataset.基于CIFAR10(小批量图片)数据集训练简单的深度卷积神经网络It gets to 75% validat...原创 2018-06-09 16:55:53 · 3749 阅读 · 1 评论 -
官网实例详解4.1(addition_rnn.py)-keras学习笔记四
基于循环神经网络的加法名词解释循环神经网络(RNN)长短期记忆网络(LSTM)代码注释执行过程C:\ProgramData\Anaconda3\python.exe E:/keras-master/examples/addition_rnn.pyUsing TensorFlow backend.Generating data...Total addition questions: 50000...原创 2018-06-08 17:59:43 · 3024 阅读 · 0 评论 -
官网实例详解4.23(mnist_cnn.py)-keras学习笔记四
基于MINIST数据集的卷积神经网络名词解释mnist,手写数据集。MNIST(Mixed National Institute of Standards and Technology database)是一个计算机视觉数据集,它包含70000张手写数字的灰度图片,其中每一张图片包含 28 X 28 个像素点。数据集来自美国国家标准与技术研究所, National Institute of Sta...原创 2018-06-08 17:58:34 · 2356 阅读 · 0 评论 -
Python: 'int' object is not subscriptable error 问题解决
报错Python: 'int' object is not subscriptable error报错语句s_x = center[0] - v_x[0] * (width / 2) - v_y[0] * (height / 2) # Python: 'int' object is not subscriptable 传入center是空值,报错原因传入center是空值,报错解决办法 ce...原创 2018-06-01 19:44:00 · 25599 阅读 · 0 评论 -
图像旋转任意角度不缺失,缺失背景指定颜色填充(python+opencv)图文教程和完整项目代码
效果展示代码import cv2from math import *import numpy as np# 顺时针旋转angle角度,缺失背景白色(255, 255, 255)填充def rotate_bound_white_bg(image, angle): # grab the dimensions of the image and then determine the ...原创 2018-06-01 18:59:28 · 11824 阅读 · 3 评论 -
人工智能python+dlib+opencv技术10分钟实现抖音人脸变狗头详细图文教程和完整项目代码
效果展示狗头开发环境实现步骤1.读取图片2.识别人脸3.人脸区域用狗头图片替换4.展示效果项目代码完整项目代码下载原创 2018-05-24 17:26:35 · 11937 阅读 · 3 评论 -
python+opencv+PIL,在图片和视频中写入中文(汉字)
效果代码#!/usr/bin/env python# -*- coding: utf-8 -*-from PIL import Image, ImageDraw, ImageFontimport cv2import numpy as np# cv2读取图片img = cv2.imread('shishi.jpg') # 名称不能有汉字cv2img = cv2.cvtColor(i...原创 2018-05-22 21:28:39 · 15733 阅读 · 11 评论 -
python3+scikit-learn+one-hot编码如何理解图文详细说明教程
原文链接:http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html说明1.图示0, 1, 0, 1 ⇒ 2,0, 1, 2, 0 ⇒ 3,3, 0, 1, 2 ⇒ 4; 第1列,有2个值(不相同) 0, 1, 0, 1 ⇒ 2 需要占2位表示第2列,有3个值(不相同) 0,...原创 2018-05-08 16:45:21 · 1632 阅读 · 0 评论 -
TabError: inconsistent use of tabs and spaces in indentation问题解决 (ubuntu16.04+python3.6 )
源代码: for image_file in os.listdir(test_path): print('image_file =',image_file) try: image_type = imghdr.what(os.path.join(test_path, image_file)) if not image_...原创 2018-03-10 10:51:38 · 7206 阅读 · 0 评论 -
PyCharm各版本和下载地址汇总
PyCharm各版本和下载地址汇总官网主页https://www.jetbrains.com/pycharm/Previous PyCharm Releases Version 1.1-2017.3https://www.jetbrains.com/pycharm/download/previous.htmlPyCharm 2017.1 and Laterhttps://confluence.jetbrains.com/display/PYH/Previous+PyCharm+Releas原创 2018-03-08 15:40:03 · 60651 阅读 · 2 评论 -
it will be treated as `np.float64 == np.dtype(float).type`.from ._conv 问题处理
it will be treated as `np.float64 == np.dtype(float).type`.from ._conv 问题处理原创 2018-03-08 10:48:04 · 4827 阅读 · 0 评论 -
TypeError: buffer is too small for requested array python 问题处理
TypeError: buffer is too small for requested array python 问题处理原创 2018-03-07 13:45:08 · 6753 阅读 · 12 评论 -
查看Anaconda版本、Anaconda和python版本对应关系和快速下载
官网https://www.anaconda.com/查看Anaconda版本(C:\ProgramData\Anaconda3) C:\Users\Administrator>conda -Vconda 4.3.30Anaconda和python版本对应关系Anaconda3-4.3.0.1-Windows-x86_64.exe 对应 python3.6.0...原创 2018-03-06 09:51:08 · 124432 阅读 · 3 评论