Giter Site home page Giter Site logo

zhihongshao / planning-based-hierarchical-variational-model Goto Github PK

View Code? Open in Web Editor NEW
117.0 117.0 40.0 18 KB

Dataset and code for ``Long and Diverse Text Generation with Planning-based Hierarchical Variational Model (EMNLP 2019)``

Python 99.71% Shell 0.29%

planning-based-hierarchical-variational-model's People

Contributors

zhihongshao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

planning-based-hierarchical-variational-model's Issues

a bug when i try to run preprocess.py

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?

There was a problem training your own dataset

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]]

数据集下载

数据集不能下载,链接有问题,能否换成其他网盘或者更新一下链接?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.