- 博客(21)
- 资源 (3)
- 收藏
- 关注
转载 FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in
https://blog.csdn.net/u014094101/article/details/80536275
2018-12-18 19:58:14 675
原创 《Flask Web开发——基于Python的Web应用开发实践》--5 数据库--视图函数里面操作数据库
我在学习《Flask Web开发——基于Python的Web应用开发实践》这本书的第五章数据库的时候,发现作者在这里给出的代码是不全的,因为他只给User表中的username赋了值,而没有考虑对Role表的name赋值, 因为设计的数据库角色和用户是一对多的关系,用户表中包含一个角色id外键...
2018-12-18 18:56:33 430
转载 python基础之%s和%r的区别
https://blog.csdn.net/mucangmang/article/details/79823583
2018-12-17 21:07:08 246
转载 flask渲染jinja2模板和传参
https://blog.csdn.net/HaigLee/article/details/81784980
2018-12-17 15:23:37 300
转载 初用pycharm测试flask时常见报错
https://blog.csdn.net/kkevinyang/article/details/51957158
2018-12-17 14:49:27 558 4
转载 Slim :Cannot assign a device for operation 'InceptionV3/Predictions/Softmax'错误
https://blog.csdn.net/weixin_38854519/article/details/81746834
2018-12-13 15:32:25 488
转载 如何使用TensorFlow在自己的图像数据上训练深度学习模型
https://blog.csdn.net/ai_girl/article/details/80801434?tdsourcetag=s_pcqq_aiomsg
2018-12-13 15:31:10 1190
转载 21个TensorFlow项目转换tfrecord:tf.train.Feature TypeError: 'RGB' has type str, but expected one of: bytes
原文地址:https://blog.csdn.net/qq_26535271/article/details/82801220撒花大赞*★,°*:.☆( ̄▽ ̄)/$:*.°★* 。
2018-12-12 09:34:48 343
转载 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte觉得有用的话,欢迎一起讨论相互学习~Follow Me今天使用语句image_raw_data_jpg = tf.gfile.FastGFile('../test_images/test_1.jpg', 'r').read()读取图片文件的时候遇到了...
2018-12-12 09:29:07 32015
原创 【验证码识别项目demo】5--测试卷积神经网络性能
def crack_captcha(): output = crack_captcha_cnn() saver = tf.train.Saver() with tf.Session() as sess: saver.restore(sess, "./tmp/ckpt/model") count = 0 predict = ...
2018-12-11 19:28:12 362
原创 【验证码识别项目demo】4--生成训练batch,定义和训练卷积神经网络
# 生成一个训练batchdef get_next_batch(batch_size=128): batch_x = np.zeros([batch_size, IMAGE_HEIGHT * IMAGE_WIDTH])#128,60*160 batch_y = np.zeros([batch_size, MAX_CAPTCHA * CHAR_SET_LEN])#128,4*63...
2018-12-10 16:26:29 735
原创 【验证码识别项目demo】3--图片转为灰度图,文本转向量,向量转文本
#_captchaTest为项目名 gen_captcha为该项目名下的python文件from _captchaTest.gen_captcha import numberfrom _captchaTest.gen_captcha import alphabetfrom _captchaTest.gen_captcha import ALPHABETfrom _captchaTest....
2018-12-10 16:19:27 796
原创 【验证码识别项目demo】2--读取验证码标签并存放至数组中
1、读取训练集验证码标签并存放至数组中import numpy as npfrom PIL import Imageimport os#指明被遍历的训练集的路径root_dir = "./tmp/train"#把验证码标记名存进列表img_list中def gen_list(): img_list = [] for parent, dirnames, f...
2018-12-10 16:12:31 209
原创 【验证码识别项目demo】1--随机生成一万张带标记的验证码图片
from captcha.image import ImageCaptcha # 如果没有模块captcha,使用pip install captcha下载import numpy as npimport matplotlib.pyplot as pltfrom PIL import Imageimport randomimport os# 验证码中的字符, 就不用汉字了numb...
2018-12-10 16:00:12 581
转载 Python中读取txt文本出现“ 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence”的解决办法
今天,练习一个通过读取txt文本信息(英文版的Walden.txt),统计文本中的英文单词词频。在读取Walden.txt文本时,出现了“UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2: illegal multibyte sequence”错误提示。错误的意思是:Unicode的解码(Decode)出现...
2018-12-03 17:01:42 5993
转载 python3中报错:TypeError: 'range' object doesn't support item deletion
通过range构造数组trainingSet = range(50);在执行以下操作时del(trainingSet[randIndex]) 报错:TypeError: 'range' object doesn't support item deletion原因是python3中range不返回数组对象,而是返回range对象解决办法将<pre name="code" class=...
2018-12-03 17:00:16 226
原创 python程序在命令行执行提示ModuleNotFoundError: No module named 'XXX' 解决方法
在ide中执行python程序,都已经在默认的项目路径中,所以直接执行是没有问题的。但是在cmd中执行程序,所在路径是python的搜索路径,如果涉及到import引用就会报类似ImportError: No module named xxx这样的错误,解决方法:在报错的模块中添加:import sysimport oscurPath = os.path.abspath(os.path...
2018-12-03 10:37:49 75348 1
转载 tf.train.batch和tf.train.shuffle_batch理解以及遇到的问题
函数原型 tf.train.batch([example, label], batch_size=batch_size, capacity=capacity)1. [example, label]表示样本和样本标签,这个可以是一个样本和一个样本标签 2. batch_size是返回的一个batch样本集的样本个数。 3. capacity是队列中的容量。这主要是按顺序组合成一个batch...
2018-12-02 17:44:18 911
转载 could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR could not destroy cudnn handle: CU问题解决方案
问题2018-04-27 17:39:18.270790: E T:\src\github\tensorflow\tensorflow\stream_executor\cuda\cuda_dnn.cc:403] could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR2018-04-27 17:39:18.270961: E T:\...
2018-12-01 20:59:31 1049
原创 TensorFlow遇到的问题汇总(持续更新中......)
1、调用tf.softmax_cross_entropy_with_logits函数出错。原因是这个函数,不能按以前的方式进行调用了,只能使用命名参数的方式来调用。原来是这样的:tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(y, y_))修改成这样的:tf.reduce_sum(tf.nn.softmax_cross_entro...
2018-12-01 16:30:09 392
转载 tf.gfile.FastGFile
tf.gfile.FastGFile(path,decodestyle) 函数功能:实现对图片的读取。 函数参数:(1)path:图片所在路径 (2)decodestyle:图片的解码方式。(‘r’:UTF-8编码; ‘rb’:非UTF-8编码)import matplotlib.pyplot as plt import tensorflow as tf #tf.gfileGF...
2018-12-01 13:43:37 1056 1
pytesseract 0.1.8
2018-01-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人