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

Error in file "LstmUnit" in line 19 - Cannot convert value [x] to a Tensorflow DType #17

Open
MarioCodeMatuschek opened this issue Jul 6, 2021 · 1 comment

Comments

@MarioCodeMatuschek
Copy link

Whenever I try to run the files in their default setting without modifications I get the following error shown in the headline.

This error is received in line 19 of the file "LstmUnit" (self.b = ...):

image

I get redirected to this file when calling the main.py function in the training setting, which calls the file "SeqUnit.py" which makes use of the "LstmUnit" file.

Does anybody have a reason for the conversion problems and may be able to help me with this issue?

@nepiskopos
Copy link

nepiskopos commented Oct 16, 2021

You have to change this line to:
self.b = tf.compat.v1.get_variable('b', [4*self.hidden_size], initializer=tf.zeros_initializer(), dtype=tf.float32)

You will encounter several more errors like that, so I suggest you use my fork of wiki2bio which I have ported to TensorFlow 1.15 and I have corrected most bugs like this one.

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