Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take another input. #10

Open
videetnimsarkar21 opened this issue Jul 3, 2019 · 3 comments
Open

Take another input. #10

videetnimsarkar21 opened this issue Jul 3, 2019 · 3 comments

Comments

@videetnimsarkar21
Copy link

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

@theamrzaki
Copy link
Owner

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

@videetnimsarkar21
Copy link
Author

videetnimsarkar21 commented Jul 8, 2019

attention_decoder timestep 99 of 100
W0708 22:36:27.830724 140576798738304 deprecation.py:323] From :113: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
options available in V2.
- tf.py_function takes a python function which manipulates tf eager
tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
an ndarray (just call tensor.numpy()) but having access to eager tensors
means 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 :447] Time to build graph: 228 seconds
W0708 22:39:02.223653 140576798738304 deprecation.py:323] From :199: Supervisor.init (from tensorflow.python.training.supervisor) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.MonitoredTrainingSession
I0708 22:39:30.694431 140576798738304 session_manager.py:500] Running local_init_op.
I0708 22:39:32.978297 140576798738304 session_manager.py:502] Done running local_init_op.
I0708 22:40:53.739769 140576798738304 supervisor.py:737] Starting standard services.
I0708 22:40:55.880370 140572232775424 supervisor.py:1117] Saving checkpoint to path logs/train/model.ckpt
I0708 22:40:55.880727 140576798738304 supervisor.py:743] Starting queue runners.
I0708 22:40:55.881700 140572713105152 supervisor.py:1099] global_step/sec: 0
I0708 22:40:55.885952 140576798738304 :241] Preparing or waiting for session...
I0708 22:40:55.890155 140576798738304 :242] Created session.
I0708 22:40:55.891672 140576798738304 :253] Starting run_training
I0708 22:40:55.895927 140576798738304 :273] Starting Seq2Seq training...
W0708 22:40:55.897850 140576798738304 :262] Bucket input queue is empty when calling next_batch. Bucket queue size: 0, Input queue size: 0
I0708 22:41:55.880472 140572232775424 supervisor.py:1117] Saving checkpoint to path logs/train/model.ckpt
I0708 22:41:55.881977 140572713105152 supervisor.py:1099] global_step/sec: 0
I0708 22:42:55.880480 140572232775424 supervisor.py:1117] Saving checkpoint to path logs/train/model.ckpt
I0708 22:42:55.882748 140572713105152 supervisor.py:1099] global_step/sec: 0

@theamrzaki
Copy link
Owner

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 yaserkl/RLSeq2Seq#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants