- 博客(18)
- 收藏
- 关注
原创 抓取数据 格式化
#!/usr/bin/python#encoding=utf-8__author__ = 'Administrator'from bs4 import BeautifulSoupimport seleniumfrom prettytable import PrettyTableimport sysimport urllibimport requestsimport timei
2017-07-31 20:54:06 440
原创 CT数据处理
#coding:utf-8import matplotlib.pyplot as pltfrom scipy import ndimageimport numpy as npfrom PIL import Imageimport osimage_height=2000image_width=1600pixel=255.0train_folder=['/home/henson/Doc
2017-07-30 20:33:41 1871
转载 (转)python图像操作
转自:zbxzc 侵删使用PIL完成[python] view plain copyimport Image #打开图像 img=Image.open('per00001.jpg') #显示 img.show() #灰度化 greyimg=img.convert('L') greyimg.show() import numpy as np #得到图像矩阵 gi
2017-07-29 21:02:50 4849
转载 (转)python爬虫技巧
from http://obmem.info/?p=753 一、gzip/deflate支持 现在的网页普遍支持gzip压缩,这往往可以解决大量传输时间,以VeryCD的主页为例,未压缩版本247K,压缩了以后45K,为原来的1/5。这就意味着抓取速度会快5倍。然而python的urllib/urllib2默认都不支持压缩,要返回压缩格式,必须在request的header里面写明’accep
2017-07-26 10:56:55 402
原创 爬虫之旅(四)
#!/usr/bin/python#encoding=utf-8__author__ = 'Administrator'from bs4 import BeautifulSoupimport seleniumimport sysimport urllibimport requestsimport timeimport reif __name__ == "__main__":
2017-07-25 20:19:15 235
原创 爬虫之旅(三)
!/usr/bin/python#encoding=utf-8__author__ = 'Administrator'from bs4 import BeautifulSoupimport seleniumimport sysimport urllibimport requestsimport timeimport reif __name__ == "__main__":
2017-07-24 20:31:16 284
原创 爬虫之旅(二)
#!/usr/bin/python#encoding=utf-8__author__ = 'Administrator'from bs4 import BeautifulSoupimport seleniumimport sysimport urllibimport requestsimport reif __name__ == "__main__": import os
2017-07-23 19:57:09 311
原创 爬虫之旅(一)
#!/usr/bin/python#encoding=utf-8__author__ = 'Administrator'import seleniumimport sysimport urllibimport requestsimport reif __name__ == "__main__": import os from selenium import webdriv
2017-07-21 18:32:50 367
原创 CNN_CT
#coding:utf-8import tensorflow as tfimport numpy as np#导入数据train_dataset=np.load('train_dataset.npy')train_labels=np.load('train_labels.npy')test_dataset=np.load('test_dataset.npy')test_labels=n
2017-07-18 08:57:20 834
原创 tensorflow学习之cifar_10模型评估
# -*- coding: utf-8 -*-import new_cifar10import tensorflow as tfimport timeimport datetimeFLAGS=tf.app.flags.FLAGStf.app.flags.DEFINE_string('eval_dir','/tmp/cifar10_eval',"""Directory where to w
2017-07-15 19:18:33 1009
原创 学习笔记之思路整理
1.图片处理:(流程被分配在16个线程中处理) 图片会被统一裁剪到24x24像素大小,裁剪中央区域用于评估或随机裁剪用于训练; 图片会进行近似的白化处理,使得模型对图片的动态范围变化不敏感。 对图像进行随机的左右翻转; 随机变换图像的亮度; 随机变换图像的对比度;训练方法与损失的定义: 训练一个可进行N维分类的网络的常用方法是使用多项式逻辑
2017-07-14 18:44:34 1437
原创 tensorflow 学习之 cifar_10 模型定义(补)
# -*- coding: utf-8 -*-import osimport tensorflow as tfimport new_cifar10_inputimport sysimport tarfileimport urllibFLAGS=tf.app.flags.FLAGS #解析命令行传递的参数#设置模型参数tf.app.flags.DEFINE_integer('b
2017-07-13 19:33:55 1109
原创 tensorflow 学习之 cifar_10 模型定义
# -*- coding: utf-8 -*-import osimport tensorflow as tfimport new_cifar10_inputFLAGS=tf.app.flags.FLAGS #解析命令行传递的参数#设置模型参数tf.app.flags.DEFINE_integer('batch_size',128,"""Number of images to pr
2017-07-12 21:07:46 586
原创 tensorflow学习之图像处理
# -*- coding: utf-8 -*-import tensorflow as tfimport os#cifar_10=input_datafrom six.moves import xrangeIMAGE_SISE=24 ## 原图像的尺度为32*32,但根据常识,信息部分通常位于图像的中央,这里定义了以中心裁剪后图像的尺寸NUM_CLASSES=10NUM_EXAMPLE
2017-07-11 21:16:35 365
原创 MNIST_cnn
# -*- coding: utf-8 -*-import tensorflow as tffrom tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_setsimport tensorflow.examples.tutorials.mnist.input_data as input_datamnist=in
2017-07-10 21:12:50 430
原创 Just PLAY
"talk is cheap, show me the code!”编程能力太菜鸡了,每天都来这里写写文档撸撸码遇见未来的自己:)
2017-07-10 21:01:20 216
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人