Coder Social home page Coder Social logo

query_completion's People

Contributors

ajaech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

query_completion's Issues

null value in dense layer.

I have trained model on my dataset but at the time of iferencing I'm getting value error.

ValueError: The last dimension of the inputs to a Dense layer should be defined. Found None. Full input shape received: <unknown>

PriorityQueue get error

in beam.py file

"class BeamItem " need to amend follows:


class BeamItem(object):
    """This is a node in the beam search tree.

    Each node holds four things: a log probability, a list of previous words, and
    the two hidden state vectors.
    """

    def __init__(self, prev_word, prev_hidden, log_prob=0.0):
        self.log_probs = log_prob
        if type(prev_word) == list:
            self.words = prev_word
        else:
            self.words = [prev_word]
        self.prev_hidden = prev_hidden

    **def __le__(self, other):
        return self.log_probs <= other.log_probs

    def __lt__(self, other):
        return self.log_probs < other.log_probs

    def __ge__(self, other):
        return self.log_probs >= other.log_probs

    def __gt__(self, other):
        return self.log_probs > other.log_probs**

    # 重定义等于比较
    def __eq__(self, other):
        return self.log_probs == other.log_probs

    def __str__(self):
        return "beam {0:.3f}: ".format(self.log_probs) + ''.join(self.words)


because PriorityQueue has Priority feature 。so ,it need add compare function。

error code ,

in mode.py file

line 130 、 132 。

130: self.per_sentence_loss = tf.div(tf.reduce_sum(self.per_word_loss, 1),
tf.reduce_sum(_mask, 1))
132: self.per_sentence_loss = tf.reduce_sum(self.per_word_loss, 1)

here
why same code definition and it not used in after code

thanks

Can't run code

Can you guide me run your code? I don't know where to locate data and what expdir is.

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.