2019年1月8日

tensorflow

摘要: tensor.get_shape()--获取tensor形状 tensor.get_shape().as_list()--将元组转化成list形式 阅读全文

posted @ 2019-01-08 10:36 海豚竹一 阅读(85) 评论(0) 推荐(0)

2018年12月24日

使用cv2将图片分割成相等的部分

摘要: def splitImage( image, num_row, num_column): im = Image.open(image) img_size = im.size x = img_size[0] // num_column y = img_size[1] // num_row all_regons = [] for j in range(... 阅读全文

posted @ 2018-12-24 16:35 海豚竹一 阅读(355) 评论(5) 推荐(0)

2018年12月22日

序列化心得

摘要: import json json--一次性写进去,一次性读出来 dict = {1:'中国‘, 2:'b'} f = open('f','w') json.dump(dict, f) 显示bytes,不影响读写 json.dump(dict, f, ensure_ascii=False) 显示中文 阅读全文

posted @ 2018-12-22 21:51 海豚竹一 阅读(96) 评论(0) 推荐(0)

2018年12月19日

python正则化表达式

摘要: 正则化表达式验证网站:http://tool.chinaz.com/regex/ 面对特殊的字符时:比如:*,?(正则中表示量词),我们希望能够表达原始的意义,而不是转义后的意思时,均加上\*,\? 字符组[字符] 元字符:\w \d \s 反集合:\W \D \S . 换行符意外的任意字符 fla 阅读全文

posted @ 2018-12-19 11:12 海豚竹一 阅读(167) 评论(0) 推荐(0)

python--匿名函数(lambda)

摘要: 匿名函数:为了解决功能简单的函数而设计的一句话函数 格式说明 阅读全文

posted @ 2018-12-19 11:09 海豚竹一 阅读(60) 评论(0) 推荐(0)

导航