![](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 jieba from keras.preprocessing.text import Tokenizer from keras.preprocessing import sequence def cut_text(text, type = 'char'): """将文本按不同方式切词,以空格作为分割""" # print(text) if type == 'char': return ' '.join(list(text)) eli原创 2020-12-03 19:26:04 · 776 阅读 · 0 评论 -
tensorflow serving部署概要
1. 目录结构 [@hbhly_SG21_41_53 pb_models]# tree textcnn/ textcnn/ └── 000 ├── saved_model.pb └── variables ├── variables.data-00000-of-00001 └── variables.index 2. 检查结果pb文件的default配置 saved_model_cli show --dir /root/huxiang/serving/pb_原创 2020-11-24 10:52:04 · 157 阅读 · 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 Keras pip instal原创 2020-10-28 13:15:17 · 386 阅读 · 0 评论 -
keras cnn以及lstm测试
1.cnn测试 import numpy as np import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras.optimizers import ...原创 2018-12-12 14:56:44 · 2099 阅读 · 0 评论