![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
tensorflow
qq_281617953
这个作者很懒,什么都没留下…
展开
-
Tensorflow报错 :TypeError: unhashable type: 'numpy.ndarray'
x = tf.placeholder("float", [batch_size, n_steps, n_input])y = tf.placeholder("float", [batch_size, n_classes])stacked_rnn = []for iiLyr in range(3): stacked_rnn.append(tf.contrib.rnn.LSTMCell(...原创 2019-05-30 11:46:49 · 10199 阅读 · 0 评论 -
word2Vect的理解
比如一个文本,我们采用原始的方式标记:"关于举办民生地质工作专业技术人员能力提升高级研修班的通知"变成这种标记:[7, 3, 2, 9, 17, 19, 12, 25, 13, 5, 0, 1, 14, 16, 4, 11, 24, 8, 15, 10, 27, 23, 22, 6, 18, 20, 26, 21]有以下缺点:1,不能正确反映单词与单词之间的距离,比如比如关是7,办是...原创 2019-06-01 22:12:40 · 738 阅读 · 0 评论 -
tf.split( )和tf.unstack( )
import tensorflow as tfA = [[1, 2, 3], [4, 5, 6]]a0 = tf.split(A, num_or_size_splits=3, axis=1)#不改变维数(!!)a1 = tf.unstack(A, num=3,axis=1)a2 = tf.split(A, num_or_size_splits=2, axis=0)a3 = tf.uns...转载 2019-05-29 23:49:48 · 522 阅读 · 0 评论 -
word2vec中的一些参数和名词解释
然语言处理领域中,判断两个单词是不是一对上下文词(context)与目标词(target),如果是一对,则是正样本,如果不是一对,则是负样本。采样得到一个上下文词和一个目标词,生成一个正样本(positive example),生成一个负样本(negative example),则是用与正样本相同的上下文词,再在字典中随机选择一个单词,这就是负采样(negative sampling)。...原创 2019-07-01 14:14:06 · 735 阅读 · 0 评论