text_summurization_abstractive_methods
text_summurization_abstractive_methods copied to clipboard
Take another input.
How to take another article as an input? i have converted an article to bin and added it to data path.
it's giving. WARNING:tensorflow:Bucket input queue is empty when calling next_batch. Bucket queue size: 0, Input queue size: 0
this is the code that i am using for model 4 to input 1 sentence i input a sentence , and i use an empty abstract , then i write this to a bin file , and i use the file name in flags.datapath
i have used this in model 4
article = inputarticle
abstract = ""
file_name = 'my_test' + time.strftime("%Y%m%d-%H%M%S") + '.bin'
with open(file_name, 'wb') as writer:
# Write to tf.Example
tf_example = example_pb2.Example()
tf_example.features.feature['article'].bytes_list.value.extend([article.encode('utf-8')])
tf_example.features.feature['abstract'].bytes_list.value.extend([abstract.encode('utf-8')])
tf_example_str = tf_example.SerializeToString()
str_len = len(tf_example_str)
writer.write(struct.pack('q', str_len))
writer.write(struct.pack('%ds' % str_len, tf_example_str))
please try this , and tell me if it working
attention_decoder timestep 99 of 100
W0708 22:36:27.830724 140576798738304 deprecation.py:323] From tf.py_functions can use accelerators such as GPUs as well as
being differentiable using a gradient tape.
- tf.numpy_function maintains the semantics of the deprecated tf.py_func
(it is not differentiable, and manipulates numpy arrays). It drops the
stateful argument making all functions stateful.
W0708 22:39:01.221755 140576798738304 deprecation.py:506] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/adagrad.py:76: calling Constant.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
I0708 22:39:01.943351 140576798738304
are you working on the notebook on python 3 .. i think this is the problem , actually this code which come from https://github.com/yaserkl/RLSeq2Seq which is built on pythoon 2.7 https://github.com/yaserkl/RLSeq2Seq/issues/2
so this notebook now only works with python 2.7 i am actually trying to upgrade it to python 3 if i am successful if God Wills it , i would upload the new upgraded notebook here
please just confirm if this is the problem (working on python3) or if there is another problem that i need to solve
thanks