Giter VIP home page Giter VIP logo

seq2seqattn_ecm's People

Contributors

aaronyalai 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

Watchers

 avatar  avatar  avatar

seq2seqattn_ecm's Issues

Is there any demo?

Could you provide an example how to put training data actually and test bot?

understanding the inference diagram.

Hey,
In the following diagrams:
Predicted Choices for emotion words
True Choices

What does Sample, Choice and Time represent respectively ?
And what is the count for each? 5 and 25?
Also what does the colour for each category represent? I think it's some kind of heat map, right?

InvalidArgumentError in infer_ECM.py

Hi!
After I finish the train of ECM, a error happened in the infer_ECM.py.
It seems perhaps like a problem like that, but I am not sure about it.
Could you have a look?
https://github.com/tensorflow/tensorflow/issues/2734

(env3) MorpheusdeMacBook-Pro:Seq2seqAttnTF morpheus$ python infer_ECM.py
Initializing embeddings ...
Done.
Building model architecture ...
Done.
2018-05-31 22:41:23.151156: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Trying to restore saved checkpoints from ./log_ECM/ ... Checkpoint found: ./log_ECM/model.ckpt-4998
Global step was: 4998
Restoring... Done.
Loading inference data ...
Done.
Start inferring ...
Traceback (most recent call last):
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1361, in _do_call
return fn(*args)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1340, in _run_fn
target_list, status, run_metadata)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 516, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[1,0] = 1009 is not in [0, 1003)
[[Node: EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@EmotionChattingMachine/concat"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup/Enter, EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/mod)]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "infer_ECM.py", line 154, in
main(args)
File "infer_ECM.py", line 122, in main
feed_dict={source_ids: batch, emo_cat: batch_cat})
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 905, in run
run_metadata_ptr)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1137, in _run
feed_dict_tensor, options, run_metadata)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1355, in _do_run
options, run_metadata)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1374, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[1,0] = 1009 is not in [0, 1003)
[[Node: EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@EmotionChattingMachine/concat"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup/Enter, EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/mod)]]
Caused by op 'EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup', defined at:
File "infer_ECM.py", line 154, in
main(args)
File "infer_ECM.py", line 63, in main
beam_size, max_iter, attn_num_units, l2_regularize, name)
File "/Users/morpheus/Seq2seqAttnTF/utils.py", line 122, in compute_ECM_loss
name="%s_decoder" % name)
File "/Users/morpheus/Seq2seqAttnTF/model/decoder.py", line 204, in build_ECM_decoder
infer_outputs, _ = dynamic_decode(decoder_cell, max_iter)
File "/Users/morpheus/Seq2seqAttnTF/model/dymdecode.py", line 72, in dynamic_decode
back_prop=False)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3096, in while_loop
result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2874, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2814, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "/Users/morpheus/Seq2seqAttnTF/model/dymdecode.py", line 50, in body
decode_finished)
File "/Users/morpheus/Seq2seqAttnTF/model/beamsearch.py", line 349, in step
new_inputs = tf.nn.embedding_lookup(self._embeddings, new_ids)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 327, in embedding_lookup
transform_fn=None)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 151, in _embedding_lookup_and_transform
result = _clip(_gather(params[0], ids, name=name), ids, max_norm)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/embedding_ops.py", line 55, in _gather
return array_ops.gather(params, ids, name=name)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 2667, in gather
params, indices, validate_indices=validate_indices, name=name)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1777, in gather
validate_indices=validate_indices, name=name)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3271, in create_op
op_def=op_def)
File "/Users/morpheus/.pyenv/versions/env3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1650, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): indices[1,0] = 1009 is not in [0, 1003)
[[Node: EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup = Gather[Tindices=DT_INT32, Tparams=DT_FLOAT, _class=["loc:@EmotionChattingMachine/concat"], validate_indices=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/embedding_lookup/Enter, EmotionChattingMachine_1/EmotionChattingMachine_decoder/decoding/while/mod)]]

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.