ajaech / query_completion Goto Github PK
View Code? Open in Web Editor NEWPersonalized Query Completion
License: Apache License 2.0
Personalized Query Completion
License: Apache License 2.0
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 you guide me run your code? I don't know where to locate data and what expdir is.
Thanks for your sharing. I want to run your code.
Can you describe how to prepare data before running trainer.py
(to reproduce your results)?
(1) Where can I download original data?
http://www.cim.mcgill.ca/~dudek/206/Logs/AOL-user-ct-collection/
Is this correct?
(2) Then, how to construct data.tsv
, valdata.tsv
, `testdata.tsv'?
Or can you provide codes for the split?
how to inference .Do you give me your test data。 you can send me email [email protected]。thanks
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>
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。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.