zhihongshao / planning-based-hierarchical-variational-model Goto Github PK
View Code? Open in Web Editor NEWDataset and code for ``Long and Diverse Text Generation with Planning-based Hierarchical Variational Model (EMNLP 2019)``
Dataset and code for ``Long and Diverse Text Generation with Planning-based Hierarchical Variational Model (EMNLP 2019)``
Hello,
I wonder how you build the Chinses ad dataset and what's the source of this dataset? Or it's done by crowdsource?
Thanks!
Xuming Lin
比如distinct-4、repetition-4等。
Traceback (most recent call last): File "preprocess.py", line 10, in <module> pickle.dump(Vocabulary.Vocabulary(), open(config.vocab_file, "wb")) File "/home/lzk/Planning-based-Hierarchical-Variational-Model/Vocabulary.py", line 33, in __init__ with open(self.config.wordvec_file) as file: FileNotFoundError: [Errno 2] No such file or directory: './data/processed/wordvec.txt'
how to fix it?
Hello, I have problems training my own dataset, category, feat_ key、feat_ The pkl files such as val have been changed and the data format has been adjusted according to yours, but there is still a problem. Can you help me solve this problem?
2022-09-25 21:29:19.479013: W tensorflow/core/framework/op_kernel.cc:1639] Unknown: KeyError: '类型'
Traceback (most recent call last):
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call
ret = func(*args)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 190, in
dataset = dataset.map(map_func=lambda x: tf.py_func(lambda y: process(y), [x], Tout=[tf.int32] * 14))
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 186, in process
return self.process_inst(line)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 117, in process_inst
res["feats_key"].append(self.vocab.lookup(item[0], 0))
File "/home/fanyongfeng/PyCharm/test_generation/Vocabulary.py", line 85, in lookup
return self.table[tpe][word]
KeyError: '类型'
0 类型
Traceback (most recent call last):
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call
return fn(*args)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn
target_list, run_metadata)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.UnknownError: {{function_node _inference_Dataset_map_453}} KeyError: '类型'
Traceback (most recent call last):
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call
ret = func(*args)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 190, in
dataset = dataset.map(map_func=lambda x: tf.py_func(lambda y: process(y), [x], Tout=[tf.int32] * 14))
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 186, in process
return self.process_inst(line)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 117, in process_inst
res["feats_key"].append(self.vocab.lookup(item[0], 0))
File "/home/fanyongfeng/PyCharm/test_generation/Vocabulary.py", line 85, in lookup
return self.table[tpe][word]
KeyError: '类型'
[[{{node PyFunc}}]]
[[IteratorGetNext]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 183, in
main()
File "main.py", line 161, in main
train(args.model_name, args.restore)
File "main.py", line 141, in train
_train(model_name, model, dataset, summary, init)
File "main.py", line 88, in _train
batchInput = dataset.next_batch(batch)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 66, in next_batch
res = self.input_sess.run(batch)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 956, in run
run_metadata_ptr)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1180, in _run
feed_dict_tensor, options, run_metadata)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1359, in _do_run
run_metadata)
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.UnknownError: {{function_node _inference_Dataset_map_453}} KeyError: '类型'
Traceback (most recent call last):
File "/home/fanyongfeng/.conda/envs/fanyfeng/lib/python3.6/site-packages/tensorflow_core/python/ops/script_ops.py", line 235, in call
ret = func(*args)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 190, in
dataset = dataset.map(map_func=lambda x: tf.py_func(lambda y: process(y), [x], Tout=[tf.int32] * 14))
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 186, in process
return self.process_inst(line)
File "/home/fanyongfeng/PyCharm/test_generation/Dataset.py", line 117, in process_inst
res["feats_key"].append(self.vocab.lookup(item[0], 0))
File "/home/fanyongfeng/PyCharm/test_generation/Vocabulary.py", line 85, in lookup
return self.table[tpe][word]
KeyError: '类型'
[[{{node PyFunc}}]]
[[IteratorGetNext]]
数据集不能下载,链接有问题,能否换成其他网盘或者更新一下链接?
想用自己的数据集训练,作者可以提供您处理数据的脚本吗?
非常感谢。
Hi,
When I try to download the data from link, it failed.
要改成这个把,train.py
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.