摘要: Python的内置HTTP请求库 urllib.request 请求模块 urllib.error 异常处理模块 urllib.parse url解析模块 urllib.robotparse robots.txt解析模块 阅读全文
posted @ 2018-10-26 09:33 X18301096 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 一、mnist的属性和方法 为了方便我只检查了后20个属性和方法 1:从tensorflow.examples.tutorials.mnist库中导入input_data文件 3:调用input_data文件的read_data_sets方法,需要2个参数,第1个参数的数据类型是字符串,是读取数据的 阅读全文
posted @ 2018-10-17 16:33 X18301096 阅读(5947) 评论(1) 推荐(1) 编辑
摘要: 1、inspect.getfile(文件名)文件名一般与类名相同,返回文件目录包含文件名 2、os.pardir 返回当前目录上一级 3、os.path.abspath() 返回绝对路径 os.path.abspath('test.csv') 'C:\\Python25\\test.csv' 4、n 阅读全文
posted @ 2018-10-09 16:56 X18301096 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 加载MNIST数据 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data/",one_hot=True) 运行TensorFlow的Intera 阅读全文
posted @ 2018-10-03 09:18 X18301096 阅读(1141) 评论(0) 推荐(0) 编辑
摘要: MNIST是一个入门级的计算机视觉数据集,它包含各种手写数字图片;它也包含每一张图片对应的标签,告诉我们这个是数字几。比如,下面这四张图片的标签分别是5,0,4,1。 从一个很简单的数学模型开始:训练一个机器学习模型用于预测图片里面的数字,它叫做Softmax Regression。 Softmax 阅读全文
posted @ 2018-10-02 14:50 X18301096 阅读(1113) 评论(0) 推荐(0) 编辑
摘要: FCN.py tensorflow命令行参数 FLAGS = tf.flags.FLAGS tf.flags.DEFINE_integer("batch_size", "2", "batch size for training") tf.flags.DEFINE_string("logs_dir", 阅读全文
posted @ 2018-10-02 08:11 X18301096 阅读(331) 评论(0) 推荐(0) 编辑
摘要: timedalte 是datetime中的一个对象,该对象表示两个时间的差值 构造函数:datetime.timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0) 其中参数都是可选,默认值为0 下面应该是常识,几乎每个人都知道: 1 millisecond = 1000 microseconds 1 minute = 60 seconds 1 hour = 3600 seconds 1 week = 7 days 在构造函数中,参数值的范围如下: 0 <= microseconds < 1000000 0 <= seconds < 3600*24 (the number of seconds in one day) -999999999 <= days <= 999999999 timedalte 有三个只读属性: timedelta.min:负数最大时间差,相当于 timedelta(-99999999 阅读全文
posted @ 2018-09-18 22:01 X18301096 阅读(940) 评论(0) 推荐(0) 编辑
摘要: 获取Tensor维度的两种方法: Tensor.get_shape() 返回TensorShape对象, 如果需要确定的数值而把TensorShape当作list使用,肯定是不行的。 需要调用TensorShape的as_list()方法, 需要调用TensorShape.as_list()方法来获 阅读全文
posted @ 2018-09-18 18:52 X18301096 阅读(5301) 评论(0) 推荐(0) 编辑