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

tensorflow 1 migration #8

Open
jiberi opened this issue Apr 7, 2017 · 3 comments
Open

tensorflow 1 migration #8

jiberi opened this issue Apr 7, 2017 · 3 comments

Comments

@jiberi
Copy link

jiberi commented Apr 7, 2017

Migration to tensorflow 1
I changed the concat from (1,xxx) to (xxx,1)
I changed the tf.nn.rnn_ to tf.contrib.rnn

But now I have this error in
File "train.py", line 161, in
train_cnn_rnn()
File "train.py", line 60, in train_cnn_rnn
l2_reg_lambda = params['l2_reg_lambda'])
File "/home/administrator/django/demo/tempo/multi-class-text-classification-cnn-rnn/text_cnn_rnn.py", line 58, in init
inputs = [tf.squeeze(input_, [1]) for input_ in tf.split(1, reduced, pooled_concat)]
File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/array_ops.py", line 1203, in split
num = size_splits_shape.dims[0]
IndexError: list index out of range

Any ideas?

@ushagayatri
Copy link

Are you able to solve this error? Please reply

@ushagayatri
Copy link

  1. I did this change in line 85 of text_cnn_rnn.py
    losses = tf.nn.softmax_cross_entropy_with_logits(labels = self.input_y, logits = self.scores) # only named arguments accepted

  2. i also changed concat from (1,xxx) to (xxx,1)

Please help with necessary changes.

@Jason2031
Copy link

Same problem here, looking forward to the solution...
I'm new to NN, but in desperate need of NN in my project...

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

3 participants