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

Incompatibility with Tensorflow version r0.12 #1

Open
wanghm92 opened this issue Dec 24, 2016 · 0 comments
Open

Incompatibility with Tensorflow version r0.12 #1

wanghm92 opened this issue Dec 24, 2016 · 0 comments

Comments

@wanghm92
Copy link

wanghm92 commented Dec 24, 2016

Hi Mr Dozat!

There seems to be some slight problem with your current code, which I assume to be because of the version upgrade of Tensorflow. When I pulled your repo and run, it gives me the following error

Traceback (most recent call last):
  File "network.py", line 392, in <module>
    network = Network(model, **cargs)
  File "network.py", line 66, in __init__
    self._ops = self._gen_ops()
  File "network.py", line 308, in _gen_ops
    train_output = self._model(self._trainset)
  File "/home/hongmin/work/biaffine_parser/lib/models/parsers/parser.py", line 38, in __call__
    top_recur, _ = self.RNN(top_recur)
  File "/home/hongmin/work/biaffine_parser/lib/models/nn.py", line 96, in RNN
    dtype=tf.float32)
  File "/home/hongmin/work/biaffine_parser/lib/models/rnn.py", line 422, in dynamic_bidirectional_rnn
    output_fw, output_state_fw = dynamic_rnn(cell_fw, inputs, sequence_length, initial_state_fw, ff_keep_prob, recur_keep_prob, dtype, parallel_iterations, swap_memory, time_major, scope=fw_scope)
  File "/home/hongmin/work/biaffine_parser/lib/models/rnn.py", line 540, in dynamic_rnn
    [_assert_has_shape(sequence_length, [batch_size])]):
  File "/home/hongmin/work/biaffine_parser/lib/models/rnn.py", line 532, in _assert_has_shape
    return logging_ops.Assert(
AttributeError: 'module' object has no attribute 'Assert'

I checked the "logging_op.py" it says:

The python wrapper for Assert is in control_flow_ops, as the Assert call relies on certain conditionals for its dependencies. Use_ control_flow_ops.Assert.

I tried to replace lib/models/rnn.py", line 532, in _assert_has_shap: return logging_ops.Assert by return control_flow_ops.Assert, and the error is gone, but futher errors come out.

However, I'm not able to guarantee no effects to other codes. I guess, if you don't mind, just try to debug and make changes to all?

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

1 participant