stardut / text-generate-rnn Goto Github PK
View Code? Open in Web Editor NEW**古诗生成(文本生成)
License: Apache License 2.0
**古诗生成(文本生成)
License: Apache License 2.0
按照
text1 = '两个黄鹂鸣翠柳'
text2 = '<《春》 '
的输入文本变量,即使在训练完所有数据以后,还会存在生成的古诗中有“”和“》”这两种特殊符号的出现,
eg:
两个黄鹂鸣翠柳园花头大空》 友事调龙地,临临坐作灯。
《春》 *途居》 无安思不惺,不爲歌许子。故次客无声,此心尽谁得。
后期效果没有readme.md里面显示的那么好。
请问1.你有什么好的建议或者修改方法吗?2.net.py文件是用来建立网络的吗,实际作用是什么呢,运行应该是在紧挨哪个py文件运行之后?
本人深度学习基础薄弱,所以问的问题也很浅,望有空答复,期待您的回复!
自己训练感觉要好久的
ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Gen/Text-Generate-RNN$ python3.6 sample.py
loading preprocessed files
reading: data/vocab.pkl
words size: 11103
load data done
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1322, in _do_call
return fn(*args)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.DataLossError: Unable to open table file model/model_loss_4.7890.ckpt-262000.meta: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]]
[[Node: save/RestoreV2/_3 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_8_save/RestoreV2", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
ub16c9@ub16c9-gpu:/media/ub16c9/fcd84300-9270-4bbd-896a-5e04e79203b7/ub16_prj/Gen/Text-Generate-RNN$ tree
.
├── data
│ ├── poetry.txt
│ ├── tang
│ ├── tensor.npy
│ └── vocab.pkl
├── data.py
├── LICENSE
├── model
│ ├── checkpoint
│ ├── model
│ ├── model_loss_1.7149.ckpt-261000.data-00000-of-00001
│ ├── model_loss_1.7149.ckpt-261000.index
│ ├── model_loss_1.7149.ckpt-261000.meta
│ ├── model_loss_2.6208.ckpt-263000.data-00000-of-00001
│ ├── model_loss_2.6208.ckpt-263000.index
│ ├── model_loss_2.6208.ckpt-263000.meta
│ ├── model_loss_3.8258.ckpt-260000.data-00000-of-00001
│ ├── model_loss_3.8258.ckpt-260000.index
│ ├── model_loss_3.8258.ckpt-260000.meta
│ ├── model_loss_4.5588.ckpt-264000.data-00000-of-00001
│ ├── model_loss_4.5588.ckpt-264000.index
│ ├── model_loss_4.5588.ckpt-264000.meta
│ ├── model_loss_4.7890.ckpt-262000.data-00000-of-00001
│ ├── model_loss_4.7890.ckpt-262000.index
│ └── model_loss_4.7890.ckpt-262000.meta
├── net.py
I liked your model . i have concern .does it generate sentence ?
eg
input : fever
output : i am having fever since last night
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.