![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
keras
HxShine
这个作者很懒,什么都没留下…
展开
-
keras preprocessing中的Tokenizer与sequence使用解读
1. 代码import jiebafrom keras.preprocessing.text import Tokenizerfrom keras.preprocessing import sequencedef cut_text(text, type = 'char'): """将文本按不同方式切词,以空格作为分割""" # print(text) if type == 'char': return ' '.join(list(text)) eli原创 2020-12-03 19:26:04 · 772 阅读 · 0 评论 -
tensorflow serving部署概要
1. 目录结构[@hbhly_SG21_41_53 pb_models]# tree textcnn/textcnn/└── 000 ├── saved_model.pb └── variables ├── variables.data-00000-of-00001 └── variables.index2. 检查结果pb文件的default配置saved_model_cli show --dir /root/huxiang/serving/pb_原创 2020-11-24 10:52:04 · 152 阅读 · 0 评论 -
tensorflow keras兼容问题
1.AttributeError: module ‘tensorflow.python.keras.backend’ has no attribute ‘get_graph’版本不匹配,查看keras和tensorflow版本匹配:https://docs.floydhub.com/guides/environments/2.AttributeError: module ‘tensorflow’ has no attribute ‘name_scope’ with Keraspip instal原创 2020-10-28 13:15:17 · 376 阅读 · 0 评论 -
keras cnn以及lstm测试
1.cnn测试import numpy as npimport kerasfrom keras.models import Sequentialfrom keras.layers import Dense, Dropout, Flattenfrom keras.layers import Conv2D, MaxPooling2Dfrom keras.optimizers import ...原创 2018-12-12 14:56:44 · 2092 阅读 · 0 评论