Giter Club home page Giter Club logo

Comments (6)

rmandyam avatar rmandyam commented on September 28, 2024 5

The order of arguments for tf.concat and tf.split have changed in TF > 0.12.
So, the actual error is in line 47 dual_encoder_model..
Replace these lines below ( # commented) and corrected below.
This should help..
Also, you may have to replace tf.batch_matmul with tf.matmul and
losses = tf.nn.sigmoid_cross_entropy_with_logits(logits=logits, labels=tf.to_float(targets))

rnn_outputs, rnn_states = tf.nn.dynamic_rnn(
cell,
#tf.concat(0, [context_embedded, utterance_embedded]),
tf.concat( [context_embedded, utterance_embedded], 0),
#sequence_length=tf.concat(0, [context_len, utterance_len]),
sequence_length=tf.concat([context_len, utterance_len], 0),
dtype=tf.float32)
#encoding_context, encoding_utterance = tf.split(0, 2, rnn_states.h)
encoding_context, encoding_utterance = tf.split(rnn_states.h, 2 , 0)

from chatbot-retrieval.

logust79 avatar logust79 commented on September 28, 2024 2

I have same problem as @nikky78

from chatbot-retrieval.

RahulRishavMohanti avatar RahulRishavMohanti commented on September 28, 2024 2

You don't really have to @nikky78 , @logust79 .
All you gotta do is change the order of concat and split parameters as mentioned before, replace batch_matmul with matmul and then alter line 81 in dual_encoder.py
losses = tf.nn.sigmoid_cross_entropy_with_logits(logits, tf.to_float(targets))
with
losses = tf.nn.sigmoid_cross_entropy_with_logits(logits=logits, labels=tf.to_float(targets))

from chatbot-retrieval.

jayurbain avatar jayurbain commented on September 28, 2024

Fixing tf.concat does not fix this problem.

from chatbot-retrieval.

rmandyam avatar rmandyam commented on September 28, 2024

No, it fixes the problem in the trace above at line 47 in dual_encoder.py, which is due to a change in the order of arguments for tf.concat and tf.split in versions of TF > 0.12
There is a disconnect between the title of this issue and the actual stack trace.
The solution for Monitors being deprecated is to use tf.train.SessionRunHook. It's in the title itself.

from chatbot-retrieval.

nikky78 avatar nikky78 commented on September 28, 2024

How do you use tf.train.SessionRunHook ?
for instance I have :
hooks = [tf.train.LoggingTensorHook({'loss'}, every_n_iter = 4)]

learn.Experiment(estimator = estimator, train_input_fn = get_train_inputs, eval_input_fn = get_eval_inputs, train_monitors = hooks, eval_hooks = hooks)

It says: Monitors are deprecated. Please use tf.train.SessionRunHook., but I don't know how to change it.

from chatbot-retrieval.

Related Issues (20)

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.