10 2018 档案
摘要:1 from bs4 import BeautifulSoup 2 3 4 5 6 html = """ 7 This is a python demo page 8 9 The demo python introduces several python courses. 10 Python is a wonderful general-purp...
阅读全文
摘要:1 import requests 2 3 #实例引入 4 # response = requests.get('http://www.baidu.com') 5 # print(type(response)) 6 # print(response.status_code) 7 # print(type(response.text)) 8 # print(res...
阅读全文
摘要:Python的内置HTTP请求库 urllib.request 请求模块 urllib.error 异常处理模块 urllib.parse url解析模块 urllib.robotparse robots.txt解析模块
阅读全文
摘要:一、mnist的属性和方法 为了方便我只检查了后20个属性和方法 1:从tensorflow.examples.tutorials.mnist库中导入input_data文件 3:调用input_data文件的read_data_sets方法,需要2个参数,第1个参数的数据类型是字符串,是读取数据的
阅读全文
摘要:1、inspect.getfile(文件名)文件名一般与类名相同,返回文件目录包含文件名 2、os.pardir 返回当前目录上一级 3、os.path.abspath() 返回绝对路径 os.path.abspath('test.csv') 'C:\\Python25\\test.csv' 4、n
阅读全文
摘要:加载MNIST数据 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/",one_hot=True) 运行TensorFlow的Intera
阅读全文
摘要:MNIST是一个入门级的计算机视觉数据集,它包含各种手写数字图片;它也包含每一张图片对应的标签,告诉我们这个是数字几。比如,下面这四张图片的标签分别是5,0,4,1。 从一个很简单的数学模型开始:训练一个机器学习模型用于预测图片里面的数字,它叫做Softmax Regression。 Softmax
阅读全文
摘要:FCN.py tensorflow命令行参数 FLAGS = tf.flags.FLAGS tf.flags.DEFINE_integer("batch_size", "2", "batch size for training") tf.flags.DEFINE_string("logs_dir",
阅读全文