Giter Club home page Giter Club logo

seq2seq-chinese-textsum's Issues

程序报错问题(deepcopy)

作者您好,请问程序报TypeError: object.new(NotImplementedType) is not safe, use NotImplementedType.new()这个错误,是因为版本问题还是gpu的问题?

TypeError: can't pickle _thread.RLock objects

Traceback (most recent call last):
File "headline.py", line 255, in
tf.app.run()
File "/home/lyy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "headline.py", line 252, in main
train()
File "headline.py", line 173, in train
model = create_model(sess, False)
File "headline.py", line 147, in create_model
forward_only=forward_only)
File "/data/NLP_projects/textsum_projects/seq2seq-chinese-textsum/seq2seq_model.py", line 180, in init
softmax_loss_function=softmax_loss_function)
File "/home/lyy/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 1215, in model_with_buckets
decoder_inputs[:bucket[1]])
File "/data/NLP_projects/textsum_projects/seq2seq-chinese-textsum/seq2seq_model.py", line 179, in
lambda x, y: seq2seq_f(x, y, False),
File "/data/NLP_projects/textsum_projects/seq2seq-chinese-textsum/seq2seq_model.py", line 140, in seq2seq_f
dtype=dtype)
File "/home/lyy/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/legacy_seq2seq/python/ops/seq2seq.py", line 857, in embedding_attention_seq2seq
encoder_cell = copy.deepcopy(cell)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 161, in deepcopy
y = copier(memo)
File "/home/lyy/anaconda3/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 385, in deepcopy
setattr(result, k, copy.deepcopy(v, memo))
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 215, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 180, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 280, in _reconstruct
state = deepcopy(state, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 150, in deepcopy
y = copier(x, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 240, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/lyy/anaconda3/lib/python3.6/copy.py", line 169, in deepcopy
rv = reductor(4)
TypeError: can't pickle _thread.RLock objects

找不到eval模块

你好,非常高兴砍刀您的代码,获益很多。我再运行的时候,提示找不到eval模块,eval应该是python的内建函数吧?麻烦您能给一下指导吗?

关于报错的问题,想请教tensorflow的版本号

您好,我运行您的代码时,运行到 model = create_model(sess, False)时,create函数调用seq2seq_model模块时,报错'NoneType' object has no attribute 'update'。我目前没有找到原因,猜想会不会是tensorflow版本的问题,想问一下您用的tensorflow是哪个版本的?或者,您是否知道这个错误的解决方案。谢谢!!!

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.