dirkweissenborn / temo

Code for evaluating models concered with modeling text.
2 stars 0 forks source link

Unit Test: Propositional Logic #2

Open rockt opened 8 years ago

rockt commented 8 years ago

First number encodes the target, next two numbers are the input, afterwards alterations of inputs and boolean gates

rockt commented 8 years ago

Current bug:

python3 train_logic.py                                            python3 ◼
Configuration:
{}
#Training sequences: 100000
#Test sequences: 10000
['max', 'mul', 'keep', 'replace']
<moru_cell.MORUCell object at 0x10ceeada0> [<tf.Tensor 'model/encoder_fw/Squeeze:0' shape=(?, 10) dtype=float32>] Tensor("model/encoder_fw/Reshape:0", shape=(?, 100), dtype=float32)
4
Traceback (most recent call last):
  File "train_logic.py", line 369, in <module>
    training(FLAGS)
  File "train_logic.py", line 98, in training
    FLAGS.keep_prob, nclasses)
  File "train_logic.py", line 304, in create_model
    length, embeddings)
  File "train_logic.py", line 298, in my_rnn
    _, final_state = rnn(cell, inps, init_state, sequence_length=lengths)
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 124, in rnn
    zero_output, state, call_cell)
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 212, in _rnn_step
    time < max_sequence_length, call_cell, empty_update)
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1183, in cond
    res_t = context_t.BuildCondBranch(fn1)
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/control_flow_ops.py", line 1106, in BuildCondBranch
    r = fn()
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/rnn.py", line 119, in <lambda>
    call_cell = lambda: cell(input_, state)
  File "/Users/rockt/workspace/temo/moru_cell.py", line 89, in __call__
    new_c = tf.reduce_sum(tf.pack(new_cs), [0])
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/array_ops.py", line 228, in pack
    return gen_array_ops._pack(values, name=name)
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/gen_array_ops.py", line 523, in _pack
    return _op_def_lib.apply_op("Pack", values=values, name=name)
  File "/usr/local/lib/python3.5/site-packages/tensorflow/python/ops/op_def_library.py", line 357, in apply_op
    (input_name, op_type_name, values))
TypeError: Expected list for 'values' argument to 'Pack' Op, not <map object at 0x10cf78d30>.
rockt commented 8 years ago

Make task harder: